wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes how to customize the title bar of a JInternalFrame Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "how to customize the title bar of a JInternalFrame" Watch "how to customize the title bar of a JInternalFrame" New topic
Author

how to customize the title bar of a JInternalFrame

Keristufer Blaze
Ranch Hand

Joined: May 01, 2004
Posts: 31
Does anyone know how to customize the title bar of a JInternalFrame? I'm using the JInternalFrame.setBorder(border) to change most of the frame and setFrameIcon to change the icon but I can't figure out how to customize the title bar. I want to customize the whole title bar including its color, the minimize, maximize, and close buttons.
Thanks.
clio katz
Ranch Hand

Joined: Apr 30, 2004
Posts: 101
Keristufer,

I don't know of a way to do this using a specific API call.

I believe (someone pls correct me if i'm wrong), this falls into the class of a Look and Feel change.

On that topic I can give you more info than you probably want:

(1) you can write a custom LAF
(2) you can play 'home alchemist' with the swing properties for
the default LAF

Option #1 is time consuming: you could subclass the Metal LAF and override settings for InternalFrame. You will have to enforce the loading of your custom LAF when your app starts, ie:



Option #2 is a risky, not really production-strength solution. if the app is just-for-you, you can play with the UIManager properties for internal frame:

First you can review the properties for InternalFrame:



Dump may produce something like:



Now you can use UIManager to put your preferred values in place.

viva la pluggable ui!^?

hth
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to customize the title bar of a JInternalFrame
 
Similar Threads
Active Title Bar Color
Active Title Bar Color
Remove Jinternalform Tital bar
How to add a button to the Title bar?
Removing titlebar from an internal frame