Results 1 to 1 of 1
Thread: Custom icon for Frame
-
Custom icon for Frame
The code below demonstrate how you can set you icon for a frame. You can only use images in gif, jpeg or png format for the icon.
Java Code:Frame frame = new Frame("MyFame"); Image icon = Toolkit.getDefaultToolkit().getImage("logo.gif"); Label lbl = new Label("Welcome",Label.CENTER); frame.add(lbl); frame.setSize(400,400); frame.setIconImage(icon); frame.setVisible(true);
Similar Threads
-
How to change Window Icon
By sharafat in forum AWT / SwingReplies: 7Last Post: 01-15-2010, 12:37 AM -
Icon initialization problem
By saz25 in forum AWT / SwingReplies: 1Last Post: 12-24-2007, 10:37 PM -
Changing icon of JOptionPane
By mew in forum New To JavaReplies: 3Last Post: 12-21-2007, 07:01 AM -
How to set an Icon in a Label?
By Soda in forum New To JavaReplies: 2Last Post: 12-07-2007, 12:38 PM -
To add an icon to my project
By Albert in forum AWT / SwingReplies: 1Last Post: 07-13-2007, 03:14 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks