Win a copy of Fixing your Scrum this week in the Agile forum!
  • 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
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

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
 
I'm gonna teach you a lesson! Start by looking at this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic