aspose file tools
The moose likes Swing / AWT / SWT and the fly likes Changing the Java Frame color 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 "Changing the Java Frame color" Watch "Changing the Java Frame color" New topic
Author

Changing the Java Frame color

Ketan Parmar
Greenhorn

Joined: Dec 04, 2000
Posts: 3

Please suggest me the technique through which i can change the Java Frame Color,or if possible i can give a blink effect in Title Bar when it is in minimized state.
Thanks.
Michael Hildner
Ranch Hand

Joined: Oct 13, 2000
Posts: 297
What do you mean when you say change the JFrame color? The title bar color or the background color?
There's a method (inherited from Component), setBackground() to change the background color. I don't know if it's possible to change the title bar color (I think that's a Windows thing) as is the blinking.
This might not be of any use, but once when writing a VB application, I noticed that the minimized app in the task bar started blinking when the program received some information. That must be a Windows thing, but maybe it's possible to write some code that would make Windows make it blink.
Ketan Parmar
Greenhorn

Joined: Dec 04, 2000
Posts: 3

We wanted to know how to call Windows Api from Java.If know it please give some technical input on it.
Please let us know the name of Windows API name that change the "Title Bar" background color.
thanks.
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
To do that you will have to write a C program that calls the windows API. Then you can use the JNI to call your C program from Java. For more information on how to do this, see the JNI documentation on sun's web site.
Ketan Parmar
Greenhorn

Joined: Dec 04, 2000
Posts: 3
thanks,
Ok,can u please let us know the "Windows API name " that changes the Title Bar color.
Or by any chance do u have any sample code which can-
- Getting Handle of "Active Java Frame"
- using the Windows API with that
thanks for ur help.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Changing the Java Frame color
 
Similar Threads
backgrounf Color of a Container
swing.noxp equivalent for non-XP windows?
java for slide
Can we color a Frame.
Displaying images in a JESS GUI