Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to customize the title bar of a JInternalFrame

 
Keristufer Blaze
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 101
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic