how to create java jframe in eclipse

Java
JFrame frame = new JFrame("Test Frame");
 frame.setSize(500,400);
 frame.setVisible(true);
 frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Source

Also in Java: