This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Dialog Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Dialog" Watch "Dialog" New topic


ravikumar Chilukuri

Joined: Sep 27, 2010
Posts: 14

i want to make the all background windows in my application dull when a dialog was opened. please suggest me a way to get this

Thanks & Regards
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2414
I don't understand the question. By default when you use dialog.setVisible(true), that dialog will be display and have focus so the other Windows in your application will not be able to receive events.

Post your SSCCE that demonstrates the problem.
Greg Brannon

Joined: Oct 24, 2010
Posts: 563
I'll add my interpretation of the OP's question, but I don't know the answer. The OP is asking how to make the inactive windows 'look' inactive or unselectable. I've seen this done by changing the opacity or apparent brightness of the background windows by shading or dimming them. Is this sometimes controlled by the default look and feel?

Always learning Java, currently using Eclipse on Fedora.
Linux user#: 501795
ravikumar Chilukuri

Joined: Sep 27, 2010
Posts: 14

Greg was right , i want to shade my background windows when a dialog was opened...

i'm achieving this by adding a glasspane with light gray color to every frame behind the dialog....

but i think its not the correct way to do so....

please help me out if there is any other alternative.

Note: i want this to happen only when a particular dialog was opened.

I agree. Here's the link:
subject: Dialog
It's not a secret anymore!