aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Invisible jPanel Boundary Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
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
Saloon Keeper

Joined: Sep 08, 2007
Posts: 3097
    
  33

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
Saloon Keeper

Joined: Sep 08, 2007
Posts: 3097
    
  33

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: 10535
    
    9

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.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Invisible jPanel Boundary