Jump to content

What JFrame component is this?


steve498

Recommended Posts

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.

 

D8qTgTa.jpg

 

Thanks biggrin.png

 

 

Titled Border https://docs.oracle.com/javase/7/docs/api/javax/swing/border/TitledBorder.html

Edited by Explv
  • Like 1
Link to comment
Share on other sites

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! biggrin.png

Edited by Khaleesi
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...