I\'m new to Java Swing and I have been struggling to start the GridBagLayout from top left corner so that c.gridx=0 c.gridy=0 will put my object on the top left corner.
a quick and simple way:
add a blank JLabel to end of page:
// your code goes here gbc.weightx = 1; gbc.weighty = 1; bg.add(new JLabel(" "), gbc); // blank JLabel