• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

how to customize the title bar of a JInternalFrame

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
When it is used for evil, then watch out! When it is used for good, then things are much nicer. Like this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic