Accessing properties of window components
Posted on 2001-06-10
If I have a Gui window which has a button to open a second window, if the button when first clicked runs a method which creates the Gui swing components, should the window when closed be disposed of or just hidden. I have set it so that the window is hidden, then subsequent clicks of the window open button will unhide the window. But how can I then access the properties of the components in the second window?
In the second window creation method I return the JFrame so that I can access its setvisible property, but how can I access eg a textbox in the window to set its text?