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