samples/componentinjection/anagram-modular/src-gui/org/apidesign/anagram/gui/About.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Thu, 30 Oct 2014 21:30:10 +0100
changeset 409 40cabcdcd2be
permissions -rw-r--r--
Updating to NBMs from NetBeans 8.0.1 as some of them are required to run on JDK8
jtulach@218
     1
package org.apidesign.anagram.gui;
jtulach@218
     2
jtulach@218
     3
/**
jtulach@218
     4
 *
jtulach@218
     5
 * @author  Dirk Ruiz
jtulach@218
     6
 */
jtulach@218
     7
public class About extends javax.swing.JFrame {
jtulach@218
     8
    
jtulach@218
     9
    /** Creates new form About */
jtulach@218
    10
    public About() {
jtulach@218
    11
        initComponents();
jtulach@218
    12
    }
jtulach@218
    13
    
jtulach@218
    14
    /** This method is called from within the constructor to
jtulach@218
    15
     * initialize the form.
jtulach@218
    16
     * WARNING: Do NOT modify this code. The content of this method is
jtulach@218
    17
     * always regenerated by the Form Editor.
jtulach@218
    18
     */
jtulach@218
    19
    private void initComponents() {//GEN-BEGIN:initComponents
jtulach@218
    20
        java.awt.GridBagConstraints gridBagConstraints;
jtulach@218
    21
jtulach@218
    22
        jPanel1 = new javax.swing.JPanel();
jtulach@218
    23
        jTextArea1 = new javax.swing.JTextArea();
jtulach@218
    24
        jButton1 = new javax.swing.JButton();
jtulach@218
    25
jtulach@218
    26
        getContentPane().setLayout(new java.awt.GridBagLayout());
jtulach@218
    27
jtulach@218
    28
        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
jtulach@218
    29
        setTitle("About Anagrams");
jtulach@218
    30
        addWindowListener(new java.awt.event.WindowAdapter() {
jtulach@218
    31
            public void windowClosing(java.awt.event.WindowEvent evt) {
jtulach@218
    32
                exitForm(evt);
jtulach@218
    33
            }
jtulach@218
    34
        });
jtulach@218
    35
jtulach@218
    36
        jPanel1.setLayout(new java.awt.GridBagLayout());
jtulach@218
    37
jtulach@218
    38
        jPanel1.setBorder(new javax.swing.border.EmptyBorder(new java.awt.Insets(11, 11, 12, 12)));
jtulach@218
    39
        jTextArea1.setBackground((java.awt.Color) javax.swing.UIManager.getDefaults().get("Panel.background"));
jtulach@218
    40
        jTextArea1.setEditable(false);
jtulach@218
    41
        jTextArea1.setLineWrap(true);
jtulach@218
    42
        jTextArea1.setText("Anagrams\n\nCopyright (c) 2003  Irritable Enterprises, Inc.");
jtulach@218
    43
        jTextArea1.setToolTipText("null");
jtulach@218
    44
        jTextArea1.setWrapStyleWord(true);
jtulach@218
    45
        gridBagConstraints = new java.awt.GridBagConstraints();
jtulach@218
    46
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
jtulach@218
    47
        gridBagConstraints.insets = new java.awt.Insets(0, 0, 12, 0);
jtulach@218
    48
        gridBagConstraints.weightx = 1.0;
jtulach@218
    49
        gridBagConstraints.weighty = 1.0;
jtulach@218
    50
        jPanel1.add(jTextArea1, gridBagConstraints);
jtulach@218
    51
jtulach@218
    52
        jButton1.setText("Close");
jtulach@218
    53
        jButton1.addActionListener(new java.awt.event.ActionListener() {
jtulach@218
    54
            public void actionPerformed(java.awt.event.ActionEvent evt) {
jtulach@218
    55
                jButton1ActionPerformed(evt);
jtulach@218
    56
            }
jtulach@218
    57
        });
jtulach@218
    58
jtulach@218
    59
        gridBagConstraints = new java.awt.GridBagConstraints();
jtulach@218
    60
        gridBagConstraints.gridx = 0;
jtulach@218
    61
        gridBagConstraints.gridy = 1;
jtulach@218
    62
        jPanel1.add(jButton1, gridBagConstraints);
jtulach@218
    63
jtulach@218
    64
        gridBagConstraints = new java.awt.GridBagConstraints();
jtulach@218
    65
        gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
jtulach@218
    66
        gridBagConstraints.weightx = 1.0;
jtulach@218
    67
        gridBagConstraints.weighty = 1.0;
jtulach@218
    68
        getContentPane().add(jPanel1, gridBagConstraints);
jtulach@218
    69
jtulach@218
    70
        pack();
jtulach@218
    71
        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
jtulach@218
    72
        setSize(new java.awt.Dimension(309, 231));
jtulach@218
    73
        setLocation((screenSize.width-309)/2,(screenSize.height-231)/2);
jtulach@218
    74
    }//GEN-END:initComponents
jtulach@218
    75
jtulach@218
    76
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
jtulach@218
    77
        this.hide();
jtulach@218
    78
    }//GEN-LAST:event_jButton1ActionPerformed
jtulach@218
    79
    
jtulach@218
    80
    /** Exit the Application */
jtulach@218
    81
    private void exitForm(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_exitForm
jtulach@218
    82
        //System.exit(0);
jtulach@218
    83
    }//GEN-LAST:event_exitForm
jtulach@218
    84
    
jtulach@218
    85
    // Variables declaration - do not modify//GEN-BEGIN:variables
jtulach@218
    86
    private javax.swing.JButton jButton1;
jtulach@218
    87
    private javax.swing.JTextArea jTextArea1;
jtulach@218
    88
    private javax.swing.JPanel jPanel1;
jtulach@218
    89
    // End of variables declaration//GEN-END:variables
jtulach@218
    90
    
jtulach@218
    91
}