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 6570313
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:44:29+00:00 2026-05-25T14:44:29+00:00

Related to this question: Is The Java Tutorials Translucent Window example giving trouble to

  • 0

Related to this question:
Is The Java Tutorials Translucent Window example giving trouble to those playing with jdk7?

with jdk1.6.0_26 I seem to be able to apply translucency to a JFrame, but not so with jre7:

NativeException: java.awt.IllegalComponentStateException: The frame is decorated

ex (jruby scripting java, works jdk1.6 not with jdk7 though):


require 'java'

class MouseDraw

  def self.go
    java_import 'javax.swing.JFrame'
    java_import 'com.sun.awt.AWTUtilities'

    f = JFrame.new
    AWTUtilities.set_window_opacity(f, 0.5)
    f.set_size 200,200
    f.show
  end

end
MouseDraw.go

So my question is “is it possible to have a translucent title bar in jdk7” (I would like a transparent window I’m creating to be draggable/resizable)

  • 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-25T14:44:29+00:00Added an answer on May 25, 2026 at 2:44 pm

    Java 7 introduced Window.setOpacity() to do what the unofficial class AWTUtilities did in Java 6.

    Unfortunately it’s documented not to work with decorated windows:

    The following conditions must be met in order to set the opacity value less than 1.0f:

    • The TRANSLUCENT translucency must be supported by the underlying system
    • The window must be undecorated (see Frame.setUndecorated(boolean) and Dialog.setUndecorated(boolean))
    • The window must not be in full-screen mode (see GraphicsDevice.setFullScreenWindow(Window))

    (Emphasis mine)

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

Sidebar

Related Questions

The answers to this related question of mine lead me to choose Java for
This question is related to calling scala code from java code. When I include
not sure if this question should be here or in serverfault, but it's java-related
Related to this question , I decided to check the UDFs in my data
Related to this question: URL characters replacement in JSP with UrlRewrite I want to
Related to this question , what is the best practice for naming a mutex?
This question is related to this one , though I think I was a
[This question is somewhat related to this question , but the answers are not...]
This question is related to this other question I recently asked... cf.net exception and
Much related to this question , we have a scenario on my team where

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.