JComboBox not displaying correctly.
Hi,
Quick question if you don't mind?!
I am writing an application that will (hopefully) automate User Creation, File Sharing and Security Settings across our Windows 2003 domain, but have run into an annoying issue with one of my GUI's in that I can't get a JComboBox to display correctly.
I have a main class that extends JFrame and all my other classes extend JPanel. Then when certain events are triggered I basically remove the current panel, load another and repaint. e.g.
this.getContentPane().remove( panel_object1 );
this.getContentPane().add( panel_object2 );
repaint();
This has been working fine, infact I poached alot of the code from an application I wrote some years back that manages Memory Resident Programs in Windows XP; however I have reached a dead end with a JComboBox.
The box appears not to have been fully loaded, as only its outline exists. If you click the screen where it should be the drop down list appears. The functionality is fine apart from the box, the down arrow and the initial option is not visible.
To further confuse me, I rearranged the order of the panels so it was the one loaded by default when the application is loaded and it appears correctly, and switching between screens does not cause any problems.
However, if I don't load the Panel it resides on first the problem continues, I even tried loading it and then forcing a call to the exit method to reload the main screen as part of the main constructor but this did not solve the problem.
This must be an issue with getting the GUI to reload or refresh correctly, but I can't seem to find anything relevant to my case on any of the forums. I could of course change tact and create a TabbedPane, but I would much rather get to the bottom of this if someone is able to help.
Thanks in advance, and if you need some code, or if I have been to vague please let me know,
Coffee_Junkie

