Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

JFrame's title bar color

Posted on 1999-07-14
5
Medium Priority
?
1,010 Views
Last Modified: 2012-05-04
Is there any way I can set the color for the title bar of a JFrame? It should work at least under Windows 95/98/NT and linux.
0
Comment
Question by:figueira
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 16

Expert Comment

by:heyhey_
ID: 1246031
my answer is 'no'

JFrame does not handle rendering of its title bar - this is handled from java.awt.Frame (in fact from java.awt.peer.FramePeer)

of course, you can always use some native stuff..
0
 
LVL 1

Author Comment

by:figueira
ID: 1246032
You mean that if I were using java.awt.Frame, I could do it? As far as I've seen in the java.awt.peer.FramePeer (and its "superinterfaces"), there's no method setting the color for the title bar...
When you say native code, you mean to write another peer implementation?
0
 
LVL 16

Expert Comment

by:heyhey_
ID: 1246033
no :)

in pure Java
"you can't change the JFrame title bar color" =
"you can't change the Frame title bar color" (which is its supoer class) =
"you can't change the FramePeer title bar color" (which is the real implementation.

but you can use JNI + some native code that calls the appropriate native platform functions that can change the title bar color (if such exist).

0
 
LVL 1

Author Comment

by:figueira
ID: 1246034
Ok, then. I guess I'll have to suffer a lot in here :-) Please post any answer and I'll give you the points.

0
 
LVL 16

Accepted Solution

by:
heyhey_ earned 300 total points
ID: 1246035
my answer is 'no'

Thanks
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

715 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