Change Frame Icon

// change the window icon
// extends JFrame class


import javax.swing.*;
public class FrameDemo3 extends JFrame
{
	public FrameDemo3(){}
	public FrameDemo3(String title)
	{
	super(title);
	setSize(400,500);
	//setDefaultLookAndFeelDecorated(true);
	// chnage the window Icon
	setIconImage(new ImageIcon("E:\\Personal\\Camera_Oct2010\\DSC00059.JPG").getImage());
	setVisible(true);
	setDefaultCloseOperation(EXIT_ON_CLOSE);
	}
	public static void main(String[] args) 
	{
		new FrameDemo3("Third wiondow");
	}
}

Download

Frame in Swing

Simple Frame
Frame with Panel
Frame Menu Event ans Color Chooser
Frame with Panel and Button
TextField and TextArea
Combobox in Frame
Change Icon of Frame
Scrollbar in Frame
Scrollbar in Frame
Add picture in Frame
Label in Frame
Toggle Buttons in frame
Radio Buttons in Frame


Write your Comment

Name :
Email Id : [ We will not publish your email id ]
Your Comment : [ Maximum 200 chars ]
Enter Security code