steve498 Posted January 6, 2016 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
Explv Posted January 6, 2016 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
steve498 Posted January 6, 2016 Author Posted January 6, 2016 Titled Border https://docs.oracle.com/javase/7/docs/api/javax/swing/border/TitledBorder.html Thank you!
Khaleesi Posted January 6, 2016 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