• 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
  • Liutauras Vilda
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Peter Rooke
  • Himai Minh
Bartenders:
  • Piet Souris
  • Mikalai Zaikin

Title-bar icon for JInternalFrame not working

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I have a JInternalFrame that is refusing to display my own icon in its title bar. I verified that the URL is correctly resolving itself, and in fact, am having no problem using the same icon in my main JFrame window. The code is simple:
setFrameIcon(new javax.swing.ImageIcon(ClassLoader.getSystemResource("PPDI.gif")));
Why would I still be seeing the java cup???
Thanks for any tips!
 
Paul Lesneski
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Annoying, java is sometimes.
The better solution was in lieu of setting the icon for each internal frame to simply do this in the constructor of my main window, which tells the UIManager to use my icon for all internal frames that are constructed from then on:
UIManager.put("InternalFrame.icon", new javax.swing.ImageIcon(ClassLoader.getSystemResource("PPDI.gif")));
Although I still don't know why the other code wouldn't work...
Sigh
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic