Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to Disable Java Logo in Dialogs?

 
Jerry Selend
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Some of my dialogs have the Java logo in the top left. How do I remove the logo?
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
dialogs inherit the logo from their parent.

to remove the icon from a JFrame, use
setIconImage(new ImageIcon("doesNotExist.gif").getImage());,or
frame.setIconImage(new ImageIcon("doesNotExist.gif").getImage());

where "doesNotExist.gif" is the name of a non-existing image file.
if you pass null as the argument, the default icon will be used.

[EDIT]
forgot to add, you also need to use
super(parent);
in the dialog's constructor
[ May 28, 2006: Message edited by: Michael Dunn ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic