Register / Login
Swing / AWT / SWT
Swing object persistence
posted 11 years ago
I'm wondering if there's an alternative, more efficient way of doing something
I'm trying to do:
I have a class which generates a frame, which in turn contains two panels. The panel on the right contains a combobox which, when selected, changes the image in the left panel.
Right now for things to work properly, I have to pass the left panel object to the class which creates the right panel, which in turn passes the left panel object to the combo box's action listener.
Is there any way of getting around this? Is it possible to reference an object created outside of a specific class, without it being passed (either as a parameter or through methods) to that class?
If the information is out there, pointing me in the right direction is sufficient - I just haven't managed to find the answer to this so far.
Thanks in advance.
Displaying TableHeader urgent
Jsplit pane and scroll pane
Problem with GridBagLayout and a vertical layout of JPanels
Loading and unloading panels on one side of JSplitPane
swing applet problem