the1btcuser Posted October 27, 2021 Share Posted October 27, 2021 (edited) https://imgur.com/bCOKWZy I'm trying to move the "Pickaxe" JLabel and Button to a new line using only flowlayout (so no fixed x,y positions). JPanel mainPanel = new JPanel(); mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.PAGE_AXIS)); mainPanel.setBorder(new EmptyBorder(23, 5, 50, 5)); mainDialog.getContentPane().add(mainPanel); JPanel treeSelectionPanel = new JPanel(); TitledBorder leftBorder = BorderFactory.createTitledBorder("Settings"); leftBorder.setTitleJustification(TitledBorder.LEFT); treeSelectionPanel.setLayout(new FlowLayout(FlowLayout.LEFT)); treeSelectionPanel.setBorder(leftBorder); JLabel treeSelectionLabel = new JLabel("Type:"); treeSelectionPanel.add(treeSelectionLabel); treeSelector = new JComboBox<>(Tree.values()); treeSelectionPanel.add(treeSelector); mainPanel.add(treeSelectionPanel); JLabel pixtypetext = new JLabel("Pickaxe:"); treeSelectionPanel.add(pixtypetext); pixselector = new JComboBox<>(pixtype.values()); treeSelectionPanel.add(pixselector); Any help is appreciated. Edited October 27, 2021 by the1btcuser Forgot to add code Quote Link to comment Share on other sites More sharing options...
skillerkidos1 Posted October 27, 2021 Share Posted October 27, 2021 Just do grid? 1,1 lol why does it have to be flow? Quote Link to comment Share on other sites More sharing options...