Thursday, December 23, 2010

School Inspection Checklist

Change the icon of the Java coffee cup

Change the icon of the coffee cup appears in the JFrame, above left, is easy. Just call the setIconImage () in JFrame.

 
frame.setIconImage (new ImageIcon ("fichero.gif"). GetImage ());


The JDialog not have this method, but inherits the icon from its parent. For this, simply create wiping as the father on a JFrame constructor that has the icon changed, or another JDialog which in turn will have changed the icon

 
JDialog dialog = new JDialog (frame);

0 comments:

Post a Comment