Link to home
Start Free TrialLog in
Avatar of sanjay_thakur
sanjay_thakur

asked on

How to get the Value ?

Hi

I have a JPopupMenu.When I right click on the Menu
I am loading a wizard screen

basically I am loading a new JFrame

which has a Jbutton "finish" and many JTextFields

Now when the user presses "finish"
I have to get the values entered in the JTextField
in the main class which loaded the Wizard

I dont have the reference of the textfields in the main class.

How do I do this?

please help



Avatar of sanjay_thakur
sanjay_thakur

ASKER

The problem is when the user presses the finish button
Then I have to read the values of all the Textfields
in some data structure (say a hashmap)and send it to the
mainframe who invoked the wizard

But I dont have any reference of the finish button in the main frame
So when the user presses the finish button in the wizard screen how do I
send this event to the main frame

 public void gui_VolumeMenu()
    {
       //here I am loading the new frame
       WizardFrame  frame = new VolumeWizard1();
       
        /**I need to do this when the user presses the    
        finish button in the new Frame ?????**/
        Iterator i = data.iterator();
        while(i.hasNext())
        {
          System.out.println("next" + i.next());
        }
       

}


ASKER CERTIFIED SOLUTION
Avatar of Ovi
Ovi

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi could you please post some source code/links
for the second option

It would be really helpful

Thanka a ton
I follwed the guidelines and implemented it

Thanks a ton