aspose file tools
The moose likes Swing / AWT / SWT and the fly likes Invisible jPanel Boundary Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "Invisible jPanel Boundary" Watch "Invisible jPanel Boundary" New topic
Author

Invisible jPanel Boundary

Dushyant Chhetri
Ranch Hand

Joined: Oct 28, 2009
Posts: 75
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
Bartender

Joined: Sep 08, 2007
Posts: 2928
    
  15

you can try the setOpaque method of JPanel


Mohamed Sanaulla | My Blog
Dushyant Chhetri
Ranch Hand

Joined: Oct 28, 2009
Posts: 75
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
Bartender

Joined: Sep 08, 2007
Posts: 2928
    
  15

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

Joined: Jul 26, 2007
Posts: 8439

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.


[Donate a pint, save a life!] [How to ask questions] [Onff-turn it on!]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Invisible jPanel Boundary
 
Similar Threads
Deployment Diagram and Part 2
database error handling
WA #1.....word association
Controlling Where a JScrollPane Opens
JPanel reference JFrame?