aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes how to pass data from one frame to other Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "how to pass data from one frame to other" Watch "how to pass data from one frame to other" New topic
Author

how to pass data from one frame to other

Saumitr Rai
Greenhorn

Joined: Apr 27, 2010
Posts: 2


In the above problem i'm trying to get a particular date to be selected by the user. Now, after selecting the date when user clicks the ok button the date value should be displayed in the DOB textfield of the other frame.

Can anyone help me with the above problem.
thanks..


[Thumbnail for swingprob.JPG]

Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10451
    
    8

Welcome to the Ranch.
What have you got so far and where are you stuck.

Check out JSpinner. It can be configured to display dates.
Check out JOptionPane. You can pass an "Object" message to its showXXXDialog methods.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Saumitr Rai
Greenhorn

Joined: Apr 27, 2010
Posts: 2
hi Maneesh,

if you see the above jpg image...you will see a DatePicker frame and a main Employee Information frame.
Now, when the user selects date(Day,Month,Year) from the DatePicker and clicks the OK button. The whole date value should be
displayed into the DOB JtextField in the Main Frame.

I'm not able to pass on this whole Date value from my DatePicker frame to the Main frame.

I don't want to open some new dialog box showing the values....I just want the texfield in the Main Frame to show the desired value.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10451
    
    8

I will repeat what I said in my previous reply. What have you got so far and where are you stuck?
Here at the Ranch, we do not provide ready made solutions but we will definitely help point you in the right direction
Please read NotACodeMill
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: how to pass data from one frame to other