[Help] Arranging Objects please help
Okay, I'm using GridBagLayout to position my items, but I'm trying to put about 4 buttons up in a corner, and if I do:
BorderLayout.WEST, it goes to the left side, but it goes to the middle, and I don't know how to do this because I'm a beginner.
Heres my code:
JPanel panel = new JPanel(new GridBagLayout());
GridBagConstraints c = new GridBagConstraints();
JButton button = new JButton("Update");
c.gridx = 0;
c.gridy = 0;
How would I change that code to put it in the corner?
Here's a picture of the program. The red means where I need the buttons.
and if the picture doesn't show up here's the Link:
Thanks, please reply as soon as possible.
Re: [Help] Arranging Objects please help
Rarely can you achieve what you want with only one panel and one layout manager. What you will need to do is place your buttons on a separate panel with whatever layout you need and then add that panel to the main panel. Or you might need to nest several panels inside one another.