Reputation: 1
I'm developing a graphic interface using Java and Swing, and I'm having a hard time getting the JButtons to stay in their position while changing from one panel to another.
There are three buttons in a row aligned in the left bottom of each panel, all the panels the same size, but somehow they manage to change their position a little when I run the application (on the design preview they show up in the right place). It's getting a bit annoying. I'd appreciate any help
Upvotes: 0
Views: 1066
Reputation: 12623
Are you trying to do tabs? If you are, a JTabbedPane
will do this much better than a button.
Since you are using the Netbeans GUI Builder, look at the options in the Component panel on the left. It has Swing
tabbed panes and AWT
panes if you really want.
Upvotes: 1