• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Invisible jPanel Boundary

 
Dushyant Chhetri
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can we draw the boundary of the Jpanel to be invisible or transparent such taht the underlying boundar can be visible without ugly ridges and edges , please help, I need this for one of my Swing forms wher the Panel sits above a background image.

 
Mohamed Sanaulla
Saloon Keeper
Posts: 3159
33
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can try the setOpaque method of JPanel
 
Dushyant Chhetri
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry I missd out that I was using the jLabels inside the Jpanel . I mean over the jPanel which does not have a setOpaque class
How do I implement this!
 
Mohamed Sanaulla
Saloon Keeper
Posts: 3159
33
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dushyant Chhetri wrote:Sorry I missd out that I was using the jLabels inside the Jpanel . I mean over the jPanel which does not have a setOpaque class
How do I implement this!


You can use setBorder() or setOpaque() methods of the JLabel. Please use the documentation for your help so that you can see what methods the particular component supports.
 
Maneesh Godbole
Saloon Keeper
Posts: 11165
14
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
taht boundar wher missd

Please UseRealWords

BorderFactory has a createEmptyBorder() method. Check out the API docs for what it does
JLabel is already set to be borderless (visible) and transparent by default.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic