steve498 Posted January 6, 2016 Share Posted January 6, 2016 (edited) Sorry if this is the wrong section I'm not exactly sure where to post it. Anyways.. What is this JFrame component? The one that puts a small box around other components. I need it so I can create a better layout for my GUI. Thanks Edited January 6, 2016 by steve498 Quote Link to comment Share on other sites More sharing options...
Explv Posted January 6, 2016 Share Posted January 6, 2016 (edited) Sorry if this is the wrong section I'm not exactly sure where to post it. Anyways.. What is this JFrame component? The one that puts a small box around other components. I need it so I can create a better layout for my GUI. Thanks Titled Border https://docs.oracle.com/javase/7/docs/api/javax/swing/border/TitledBorder.html Edited January 6, 2016 by Explv 1 Quote Link to comment Share on other sites More sharing options...
steve498 Posted January 6, 2016 Author Share Posted January 6, 2016 Titled Border https://docs.oracle.com/javase/7/docs/api/javax/swing/border/TitledBorder.html Thank you! Quote Link to comment Share on other sites More sharing options...
Khaleesi Posted January 6, 2016 Share Posted January 6, 2016 (edited) here is some sample code of the border on a JPanel: JPanel panelSettings = new JPanel(); panelSettings.setLayout(null); panelSettings.setBorder(BorderFactory.createTitledBorder("Attack style")); panelSettings.setBounds(10, 11, 250, 91); contentPane.add(panelSettings); Have fun! Edited January 6, 2016 by Khaleesi Quote Link to comment Share on other sites More sharing options...