Created
October 5, 2019 01:12
-
-
Save sugiartocokrowibowo/11628efb274dbf290aac5ba9bb7bd4d6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.swing.SwingUtilities; | |
import java.awt.BorderLayout; | |
import javax.swing.JPanel; | |
import javax.swing.JFrame; | |
public class WindowInformatika extends JFrame { | |
private JPanel jContentPane = null; | |
public static void main(String[] args) { | |
SwingUtilities.invokeLater(new Runnable() { | |
public void run() { | |
WindowInformatika thisClass = new WindowInformatika(); | |
thisClass.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); | |
thisClass.setVisible(true); | |
} | |
}); | |
} | |
/** | |
* This is the default constructor | |
*/ | |
public WindowInformatika() { | |
super(); | |
initialize(); | |
} | |
private void initialize() { | |
this.setSize(600, 400); | |
this.setContentPane(getJContentPane()); | |
this.setTitle("INFORMATIKA APP"); | |
this.setLocationRelativeTo(null); | |
} | |
private JPanel getJContentPane() { | |
if (jContentPane == null) { | |
jContentPane = new JPanel(); | |
jContentPane.setLayout(new BorderLayout()); | |
} | |
return jContentPane; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment