Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6132775
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:08:40+00:00 2026-05-23T17:08:40+00:00

How can i completely make this grey panel as transparent , so that i

  • 0

How can i completely make this grey panel as transparent, so that i can see only the button “Test” but not the grey box (JPanel or JLayeredPane)

Screen shot: enter image description here

public class win extends JWindow 
{
    ...

    public win() 
    {
        super(new JFrame());
        layers = new JLayeredPane();
        button = new JButton("close");

        this.setLayout (new BorderLayout ());
        ..

        button.setBackground(Color.RED);
        button.setSize(200,200);
        button.setLocation(0,20);
        this.add("North", button);

        JPanel p = new JPanel();
        p.setOpaque(false);
        p.setSize(300, 200);
        p.setLocation(0, 0);
        p.add(new JButton("Test"));

        layers.add(p, new Integer(1));
        layers.setSize(400,300);
        layers.setLocation(400,50);
        layers.setOpaque(false);
        this.add("North", layers);

        canvas.setSize(screenSize.width,screenSize.height);
        this.add("North",canvas);
        //com.sun.awt.AWTUtilities.setWindowOpacity(this, 0.5f); // gives error in my Java version

    }
}

Follow up: installed as recommended, but no luck yet.

ERROR not solved: Exception in thread "main" java.lang.UnsupportedOperationException: The TRANSLUCENT translucency kind is not supported.

Installed:
  compiz-gnome.i686 0:0.9.4-2.fc15                                                      

Dependency Installed:
  compiz-gtk.i686 0:0.9.4-2.fc15           compiz-plugins-main.i686 0:0.9.4-1.fc15     
  libcompizconfig.i686 0:0.9.4-1.fc15      protobuf.i686 0:2.3.0-7.fc15                

Complete!
You have mail in /var/spool/mail/root
[root@example ~]# xdpyinfo | grep -i render
    RENDER
You have mail in /var/spool/mail/root
[root@example ~]# xdpyinfo | grep -i comp
    Composite
    XVideo-MotionCompensation
[root@example ~]# 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T17:08:41+00:00Added an answer on May 23, 2026 at 5:08 pm

    See this article or this article. Note that not all environments support all the features (translucency, per pixel transparencyt etc.) described in the article.

    EDIT: On my system (Ubuntu 10.04.2 LTS, Sun java 1.6.0_26) the following code:

      System.out.println("TRANSLUCENT supported:          " + AWTUtilities.isTranslucencySupported(AWTUtilities.Translucency.TRANSLUCENT));
      System.out.println("PERPIXEL_TRANSPARENT supported: " + AWTUtilities.isTranslucencySupported(AWTUtilities.Translucency.PERPIXEL_TRANSPARENT));
      System.out.println("PERPIXEL_TRANSLUCENT supported: " + AWTUtilities.isTranslucencySupported(AWTUtilities.Translucency.PERPIXEL_TRANSLUCENT));
    

    gives:

    TRANSLUCENT supported:          false
    PERPIXEL_TRANSPARENT supported: true
    PERPIXEL_TRANSLUCENT supported: true
    

    EDIT2: Inspired by this discussion, I just installed and configured compiz and now the ‘constant opacity level’ slider of the web start application at the second article linked above suddenly can be moved to values smaller than 100% and the demo frame actually is translucent. Also the code snipped shown above now prints true for all three kinds of translucency/transparency. And AWTUtilities.setWindowOpacity(..) does not throw any more but produces a transparent window.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I will try to make this as clear as I can, but if you
Not sure how to make this work. I am guessing I can store this
Can anybody please explain how this could possibly happen? I am completely aware of
I have a couple old services that I want to completely uninstall. How can
I'll make this short and to the point. The _asm block has been completely
To clarify: no I can't make this pure PHP5 yes this code works in
This situation can only occur without name mangling (I believe), so the below code
I would like to make a bot that can carry on a simple conversation.
Can there be buffer overflow/overrun vulnerabilities in completely managed asp.net web portal.If yes how
Simple question: Can a swing frame be completely modal ( block all others windows

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.