Type this following java programming code on your java programming IDE:
import javax.swing.JFrame;
public class Swing_implement{
/**
* Create the GUI and show it.
*
*/
private static void createGUI() {
//Create the window.
JFrame frame = new JFrame("Swing implementation");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//Display the window.
frame.pack();
frame.setSize(300,150);
frame.setVisible(true);
}
public static void main(String[] args) {
//Schedule a job for the event-dispatching thread:
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
createGUI();
}
});
}
}
Result
Java Swing JFrame Window |
Bibliography:
https://docs.oracle.com/
https://uny.ac.id/ ( university )
https://www.java-examples.com/
gui, Graphical User Interface (GUI), Java form window, jfc, Java Foundation Class (JFC), swing package, api, Application Programming Interface (API), Java swing
Tidak ada komentar:
Posting Komentar