This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have a problem when trying to switch to a different JPanel when you press another button on a toolbar.
The panel does not show up until I resize the window or let a JTextArea appear instead of a JPanel. More specifically: the btnStakes currently places a JTextArea in BorderLayout.CENTER, wich works right away. The btnContacts places my own JPanel in the center but when I press that button before I do anything else, nothign comes up. If I resize my screen, or press the btnStakes first and then the btnContacts button, the panel does show up. Does anyone know a good way of dynammically adding/removing panels to a layout with proper refreshing/redrawing?
I currently have the following code: My panel:
The main screen where the toolbar and the panel should come: