|
| 1 | +/* |
| 2 | + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license |
| 3 | + * Click nbfs://nbhost/SystemFileSystem/Templates/GUIForms/JFrame.java to edit this template |
| 4 | + */ |
| 5 | +package javanotepad; |
| 6 | + |
| 7 | +/** |
| 8 | + * |
| 9 | + * @author belva |
| 10 | + */ |
| 11 | +public class MainWindow extends javax.swing.JFrame { |
| 12 | + |
| 13 | + /** |
| 14 | + * Creates new form MainWindow |
| 15 | + */ |
| 16 | + public MainWindow() { |
| 17 | + initComponents(); |
| 18 | + } |
| 19 | + |
| 20 | + /** |
| 21 | + * This method is called from within the constructor to initialize the form. |
| 22 | + * WARNING: Do NOT modify this code. The content of this method is always |
| 23 | + * regenerated by the Form Editor. |
| 24 | + */ |
| 25 | + @SuppressWarnings("unchecked") |
| 26 | + // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents |
| 27 | + private void initComponents() { |
| 28 | + |
| 29 | + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); |
| 30 | + setTitle("Java Notepad"); |
| 31 | + |
| 32 | + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); |
| 33 | + getContentPane().setLayout(layout); |
| 34 | + layout.setHorizontalGroup( |
| 35 | + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
| 36 | + .addGap(0, 763, Short.MAX_VALUE) |
| 37 | + ); |
| 38 | + layout.setVerticalGroup( |
| 39 | + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) |
| 40 | + .addGap(0, 471, Short.MAX_VALUE) |
| 41 | + ); |
| 42 | + |
| 43 | + pack(); |
| 44 | + }// </editor-fold>//GEN-END:initComponents |
| 45 | + |
| 46 | + /** |
| 47 | + * @param args the command line arguments |
| 48 | + */ |
| 49 | + public static void main(String args[]) { |
| 50 | + /* Set the Nimbus look and feel */ |
| 51 | + //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> |
| 52 | + /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. |
| 53 | + * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html |
| 54 | + */ |
| 55 | + try { |
| 56 | + for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { |
| 57 | + if ("Nimbus".equals(info.getName())) { |
| 58 | + javax.swing.UIManager.setLookAndFeel(info.getClassName()); |
| 59 | + break; |
| 60 | + } |
| 61 | + } |
| 62 | + } catch (ClassNotFoundException ex) { |
| 63 | + java.util.logging.Logger.getLogger(MainWindow.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); |
| 64 | + } catch (InstantiationException ex) { |
| 65 | + java.util.logging.Logger.getLogger(MainWindow.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); |
| 66 | + } catch (IllegalAccessException ex) { |
| 67 | + java.util.logging.Logger.getLogger(MainWindow.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); |
| 68 | + } catch (javax.swing.UnsupportedLookAndFeelException ex) { |
| 69 | + java.util.logging.Logger.getLogger(MainWindow.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); |
| 70 | + } |
| 71 | + //</editor-fold> |
| 72 | + |
| 73 | + /* Create and display the form */ |
| 74 | + java.awt.EventQueue.invokeLater(new Runnable() { |
| 75 | + public void run() { |
| 76 | + new MainWindow().setVisible(true); |
| 77 | + } |
| 78 | + }); |
| 79 | + } |
| 80 | + |
| 81 | + // Variables declaration - do not modify//GEN-BEGIN:variables |
| 82 | + // End of variables declaration//GEN-END:variables |
| 83 | +} |