Skip to content

Instantly share code, notes, and snippets.

@sugiartocokrowibowo
Created October 5, 2019 01:12
Show Gist options
  • Save sugiartocokrowibowo/11628efb274dbf290aac5ba9bb7bd4d6 to your computer and use it in GitHub Desktop.
Save sugiartocokrowibowo/11628efb274dbf290aac5ba9bb7bd4d6 to your computer and use it in GitHub Desktop.
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