Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement