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