Results 1 to 6 of 6
- 11-06-2010, 01:11 PM #1
Member
- Join Date
- Nov 2010
- Posts
- 3
- Rep Power
- 0
Sending string from one form to other - HOW?
Hi!
I have a desktop swing application with two jforms. The one is the main form with many textfields and the other form is for selecting some possible values for the main form.
For example: I have a jtextfild in the main form for inserting address (adresses are predefined). these addresses can be selected in the second form. The second form activated for f7 function key and you can select address.
My problem is how to send the selected adress (String) from the second form to the main form?
Thanks!
-
- 11-06-2010, 01:46 PM #3
Member
- Join Date
- Nov 2010
- Posts
- 3
- Rep Power
- 0
jform is a JFrame
-
What you have is two JFrames then, one acting as a dialog. So I'll have to ask, why not just use a dialog instead such as a JOptionPane or a JDialog? This way you can choose for the dialog to be modal if desired (or not) as well as guarantee that the dialog window is always above the JFrame window.
Now on to your problem, you transfer information from one GUI class to another same as as you would for any OOP program, often with getXXX and setXXX methods. The specifics will depend on your code of course.
Luck!
-
Oh, and welcome to the forum, by the way!
- 11-06-2010, 02:18 PM #6
Member
- Join Date
- Nov 2010
- Posts
- 3
- Rep Power
- 0
Similar Threads
-
using a loop to form a string pattern
By xquizitpinay in forum New To JavaReplies: 7Last Post: 10-29-2010, 04:06 AM -
Sending a formatted string to a servlet
By higashij in forum Java ServletReplies: 0Last Post: 12-18-2009, 01:20 AM -
How to validate a string in the form E25/8938/2009
By nmvictor in forum New To JavaReplies: 8Last Post: 10-18-2009, 02:37 PM -
JSP sending a String to a "mini App" and calls that program too.
By pikapika2501 in forum JavaServer Pages (JSP) and JSTLReplies: 1Last Post: 06-25-2009, 11:19 AM -
Removing all the instances of a given text form a String
By Java Tip in forum Java TipReplies: 1Last Post: 01-11-2008, 10:06 PM


LinkBack URL
About LinkBacks

Bookmarks