Changing caption color of awindow

Posted on 1998-05-28
Last Modified: 2010-04-16
Window Caption color change:

      I need to change the caption color of the window, it is always displaying in blue color
when the window is active and in gray when it is inactive. I want to change caption color to Green when it is active.
Can anybody suggest how to change the caption color of the window.


Question by:Ravi052898
  • 2
  • 2
  • 2
  • +1

Author Comment

ID: 1221683
Edited text of question

Expert Comment

ID: 1221684
In java, there is no way.

You can give the environment you are working in and based on it, you can use some desktop tools to set the caption color etc.,.
I can suggest the tool if you want.


Author Comment

ID: 1221685
Please suggest the tool, but I a want solution that can be solved
by java program , I need to change the color of th caption  dynamically
Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.


Expert Comment

ID: 1221686
How about implementing a Window class instead of a Frame class, and drawing bordures & caption by yourself? This is not so hard; the caption rectangle needs only to follow the movement of the mouse.


Expert Comment

ID: 1221687
I am sorry but I tried what I said in the previous comment, and it can't work because Window class creates a modal window.

So the answer to your question is: you can't change the window's caption rectangle's color in Java. It is handled by the window manager.

You should think of creating alternative visual cues if you want the attention of the user.

LVL 16

Expert Comment

ID: 1221688
You could probably do it with a native method.


Accepted Solution

evijay earned 100 total points
ID: 1221689

You can go to display properties in windows (Control Panel -->  Display --> Appearance) and Select item choice box as
Active Title bar and then select the color you want !!.

If you are using unix platform, i want the specific unix you are using for suggesting the tool and procedure.


Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
numbers ascending pyramid 101 196
jdbc error in jsp application 20 46
Running JavaFX on JDeveloper 12C 1 33
Java syntax, or is it Selenium 6 16
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question