• Post Reply Bookmark Topic Watch Topic
  • New Topic

Changing the Java Frame color  RSS feed

 
Ketan Parmar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 297
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!