how to customize the title bar of a JInternalFrame
Keristufer Blaze
Ranch Hand
Joined: May 01, 2004
Posts: 31
posted
0
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
posted
0
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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: how to customize the title bar of a JInternalFrame