This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Components brought infront of Glass Panel 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 "Components brought infront of Glass Panel" Watch "Components brought infront of Glass Panel" New topic
Author

Components brought infront of Glass Panel

Tom Josephits
Greenhorn

Joined: Mar 11, 2012
Posts: 27
I wanted to make my own sort of message boxes for a program I'm working on for both stylistic reasons and later some functional ones.

First I have it create a black JPanel and make it the glass panel so that it may be slightly transparent as well as in-front of everything. After that, I add a custom JPanel in front of that, that serves as the actual message. The problem is, when I add an object to the center of it, the object underneath it comes to the front; and by underneath, I man under the glass panel. If I add something to the top, where there's nothing under it, it has not effect. Also, I'm using BorderLayout if that makes a difference.
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
you may have to post a working example of the problem (with steps to reproduce).
exclude everything unrelated to the problem.
Tom Josephits
Greenhorn

Joined: Mar 11, 2012
Posts: 27
I got rid of the components underneath until I could figure out was was wrong for finishing the code. When I added them back it was fixed. No idea what was wrong.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Components brought infront of Glass Panel
 
Similar Threads
Issue regarding Glass Pane
cannot get stuff to repaint - please help
repaint problem in JPanel
Accessing Swing widgets while double buffering
How can I drop an object?