> Also, which command under properties will allow me to set a JPanel to default not visible? I have a main game window I am opening, and don't want the side JPanel to be visible unless the user clicks the toggle button I have placed on the main screen, but as of right now it shows up upon first running the program. I'm sure I can go into the source code and delete the setVisible(true) that is generated during instantiation, but I'm hoping for a faster method.
This is old but for those who happen upon it and would like an answer:
- very simple: this is exactly what your Init section is for. Disable all you want hidden until some action.
I have found using panes for groups of stuff much easier than each item hide/visible. It has the side effect of collapsing, if possible, to avoid large blank areas.