This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes createTitledBorder on a simple panel Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "createTitledBorder on a simple panel" Watch "createTitledBorder on a simple panel" New topic
Author

createTitledBorder on a simple panel

Chaz Branham
Ranch Hand

Joined: Apr 04, 2013
Posts: 44

Hello All,

I am trying to learn Layout's and have been following the examples and seem to be missing something. I am just trying to create a Titled Border around a JPanel docked inside of a JFrame. The code executes with no error's and I can see my JPanel on the JFrame but I cannot get it to add the TitledBorder as far as I can tell. Any help with this is greatly appreciated. Below is my code:

First and Main Class:


MainFrame Class:


ProjectPanel Class:


Thanks again for any help or comments.


TheChazm
Piet Souris
Ranch Hand

Joined: Mar 08, 2009
Posts: 417
    
    5
hi Chaz,

well, you're thinking you are placing a titled border around your ProjectPanel, but you're not!

Have a look at your ProjectPanel class. To what panel are you adding your border, and which panel
are you adding to your MainFrame? Are they the same?

Greetz,
Piet
Chaz Branham
Ranch Hand

Joined: Apr 04, 2013
Posts: 44

lol well isn't that a smack in the face hahaha I see what you mean and thank you very much.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: createTitledBorder on a simple panel
 
Similar Threads
Line spacing
JPanel painComponent not working
What is/the point of, a secure thread?
Can't create a brand new panel
GroupLayout not working in a JPanel