• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Jj Roberts
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Himai Minh
  • Carey Brown
  • salvin francis

Icon image of frame

 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now i found a problem at changing the icon image of frame from the default java symbol.I found a method defined in the class of java.awt.frame -
setIconImage(Image image) , but i don't konw how to use the image argument to specify the image i want use in the frame.Thanks.
 
Sheriff
Posts: 7023
 
Steven Zeng
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,Dirk, you know, the class you offered is a abstract class ,but I don't know how to get a instance of that class , if I don't want to create a subclass of it,can I use java.awt.toolkit class?
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Toolkit.getDefaultToolkit() gets the real Toolkit on your system... the implementing class is package private because it changes based on system and you shouldn't access it directly.
 
I claim this furniture in the name of The Ottoman Empire! You can keep this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic