Change JFrame Icon In Java

How To Customize JFrame Icon In Java Using Eclipse

change java jframe icon



In this Java Tutorial we will see How To Change jFrame Icon From The Defaut ImageICon To A New One In Java Eclipse .




Project Source Code:

import java.awt.Toolkit;

import javax.swing.JFrame;
import javax.tools.Tool;


public class JFrame_Icon extends JFrame {

public JFrame_Icon()
{
setTitle("JFrame Icon");
setBounds(200,200,300,300);
setIconImage(Toolkit.getDefaultToolkit().
getImage(JFrame_Icon.class.getResource("/images/APP.png")));
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
public static void main(String[] args)
{
JFrame_Icon fic = new JFrame_Icon();
fic.setVisible(true);
}
}


// OUTPUT :


change java jframe ImageIcon

Share this

Related Posts

Previous
Next Post »