Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Swing  RSS feed

 
Asmita Rane
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to remove coffee cup image from left top of JFrame & JDialog, & showing our own custom image at that place.
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
frame.setIconImage(...);
 
Olivier Legat
Ranch Hand
Posts: 176
Chrome Mac Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In addition to what Micheal said. You can use the javax.swing.ImageIcon class to create an ImageIcon from a file in your computer using the constructor ImageIcon(String). Get use the method getImage() to use a parameter in Frame.setIconImage(Image)


 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Asmita,
Welcome to the Ranch. We are happy to have you here

To get the most out of the Ranch, it would be a good idea to use a meaningful title for your thread.
Having a thread titled "Swing" in the Swing forum is hardly intuitive for the readers

It might also be a good idea to check this out.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!