wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes How to change the height of the JFrame title bar and its color? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to change the height of the JFrame title bar and its color?" Watch "How to change the height of the JFrame title bar and its color?" New topic
Author

How to change the height of the JFrame title bar and its color?

S Dan
Greenhorn

Joined: Apr 05, 2005
Posts: 25
How can I change the height of the JFramHow to change the height of the JFrame title bar and its colore title bar and its color? Please don't suggest to change the height by changing the font size of the title bar..Thats a hack and doesn't look good at all. In general, is it possible to write a custom JFrame title bar? Working example will be appreciated. Thanks.
-Dan
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

It's up to the host window system to draw that title bar, so the answer is, generally, no. What you can do, though, is to use a Window instead of a JFrame, and in that Window (which has no title bar) draw a fake title bar yourself. You'd have to handle dragging, click-to-close, etc yourself, but of course you can make it look like whatever you want.


[Jess in Action][AskingGoodQuestions]
zvrt zvrt
Greenhorn

Joined: Feb 24, 2006
Posts: 1
use IFrame instead (http://www-128.ibm.com/developerworks/java/library/j-iframe/)
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to change the height of the JFrame title bar and its color?
 
Similar Threads
changing color of the title bar of a frame
How do I change the JFrame title bar color
how to customize the title bar of a JInternalFrame
JFrame title bar height
Windows height