Make a panel and then use a BorderLayout and then for the location use PAGE_START... look below:



mainPanel.setLayout(new BorderLayout());
mainPanel.add(topLeftButton,...