• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Ugly white space around ImageIcons placed on JInternalFrame Title Bar

 
Rancher
Posts: 1776
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am using Metal L&F for my application but would prefer max, min & close icons to be in basic windows l&f.
So I downloaded max,min&close buttons looking like normal windows l&f and trying to set it as JInternalFrame's Title bar max,close& min images.

They are perfectly setting & doing the desired actions but there is a small amount of ugly white spaces on the four borders of the images. Please let me know if I could try remove the white space around the ImageIcons placed around the Title Bar.

Note -
I tried both with .png & .gif images. I tried ImageIcons creating from WindowsIconFactory. But still i got the white spaces.

I use InternalFrame.maximizeIcon, etc property to set the Image Icons. Below is a sample code

UIManager.put("InternalFrame.closeIcon", new ImageIcon("close2.png"));
UIManager.put("InternalFrame.iconifyIcon", new ImageIcon("minimize_icon.gif"));
UIManager.put("InternalFrame.maximizeIcon", new ImageIcon("maximize_icon.gif"));

I am also attaching the screen shot of my application's title bar
TB1.JPG
[Thumbnail for TB1.JPG]
Title Bar
TB2.JPG
[Thumbnail for TB2.JPG]
A bit enlarged
 
John Jai
Rancher
Posts: 1776
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also I would like to get good images of the Maxi, mini & close icons with native Windows L&F to be used on the InternalFrame. Searched in net but could not find decent images. Thanks much!
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic