java/abc-drupal-gui/src/cz/frantovo/abcDrupal/gui/HlavniOkno.java
author František Kučera <franta-hg@frantovo.cz>
Wed, 30 Dec 2009 02:35:15 +0100
changeset 0 f1a6902957b8
child 2 2f02db6cd698
permissions -rw-r--r--
Vytvoření projektu v Netbeans.
     1 /*
     2  * HlavniOkno.java
     3  *
     4  * Created on 30.12.2009, 2:22:41
     5  */
     6 package cz.frantovo.abcDrupal.gui;
     7 
     8 import com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel;
     9 import java.util.logging.Level;
    10 import java.util.logging.Logger;
    11 import javax.swing.UIManager;
    12 import javax.swing.UnsupportedLookAndFeelException;
    13 
    14 /**
    15  *
    16  * @author fiki
    17  */
    18 public class HlavniOkno extends javax.swing.JFrame {
    19 
    20     private static final Logger log = Logger.getLogger(HlavniOkno.class.getName());
    21 
    22     /** Creates new form HlavniOkno */
    23     public HlavniOkno() {
    24 	initComponents();
    25     }
    26 
    27     /** This method is called from within the constructor to
    28      * initialize the form.
    29      * WARNING: Do NOT modify this code. The content of this method is
    30      * always regenerated by the Form Editor.
    31      */
    32     @SuppressWarnings("unchecked")
    33     // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    34     private void initComponents() {
    35 
    36         jButton1 = new javax.swing.JButton();
    37         jTextField1 = new javax.swing.JTextField();
    38 
    39         setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    40 
    41         jButton1.setText(":-)");
    42 
    43         jTextField1.setText("jTextField1");
    44 
    45         javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    46         getContentPane().setLayout(layout);
    47         layout.setHorizontalGroup(
    48             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    49             .addGroup(layout.createSequentialGroup()
    50                 .addContainerGap()
    51                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    52                     .addComponent(jButton1, javax.swing.GroupLayout.Alignment.TRAILING)
    53                     .addComponent(jTextField1, javax.swing.GroupLayout.DEFAULT_SIZE, 388, Short.MAX_VALUE))
    54                 .addContainerGap())
    55         );
    56         layout.setVerticalGroup(
    57             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    58             .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
    59                 .addContainerGap()
    60                 .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    61                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 234, Short.MAX_VALUE)
    62                 .addComponent(jButton1)
    63                 .addContainerGap())
    64         );
    65 
    66         pack();
    67     }// </editor-fold>//GEN-END:initComponents
    68 
    69     /**
    70      * @param args the command line arguments
    71      */
    72     public static void main(String args[]) {
    73 	nastavLaF();
    74 
    75 	java.awt.EventQueue.invokeLater(new Runnable() {
    76 
    77 	    public void run() {
    78 		new HlavniOkno().setVisible(true);
    79 	    }
    80 	});
    81     }
    82 
    83     private static void nastavLaF() {
    84 	try {
    85 	    UIManager.setLookAndFeel(new NimbusLookAndFeel());
    86 	} catch (UnsupportedLookAndFeelException e) {
    87 	    log.log(Level.FINE, "Nepodařilo se načíst LaF. Nevadí.");
    88 	}
    89     }
    90     // Variables declaration - do not modify//GEN-BEGIN:variables
    91     private javax.swing.JButton jButton1;
    92     private javax.swing.JTextField jTextField1;
    93     // End of variables declaration//GEN-END:variables
    94 }