Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

createTitledBorder on a simple panel

 
Chaz Branham
Ranch Hand
Posts: 53
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Piet Souris
Rancher
Posts: 1296
28
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 53
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
lol well isn't that a smack in the face hahaha I see what you mean and thank you very much.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic