java/abc-drupal-gui/src/cz/frantovo/abcDrupal/gui/HlavniOkno.java
changeset 1 05e958e4e928
child 2 2f02db6cd698
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/java/abc-drupal-gui/src/cz/frantovo/abcDrupal/gui/HlavniOkno.java	Thu Dec 31 18:00:23 2009 +0100
     1.3 @@ -0,0 +1,94 @@
     1.4 +/*
     1.5 + * HlavniOkno.java
     1.6 + *
     1.7 + * Created on 30.12.2009, 2:22:41
     1.8 + */
     1.9 +package cz.frantovo.abcDrupal.gui;
    1.10 +
    1.11 +import com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel;
    1.12 +import java.util.logging.Level;
    1.13 +import java.util.logging.Logger;
    1.14 +import javax.swing.UIManager;
    1.15 +import javax.swing.UnsupportedLookAndFeelException;
    1.16 +
    1.17 +/**
    1.18 + *
    1.19 + * @author fiki
    1.20 + */
    1.21 +public class HlavniOkno extends javax.swing.JFrame {
    1.22 +
    1.23 +    private static final Logger log = Logger.getLogger(HlavniOkno.class.getName());
    1.24 +
    1.25 +    /** Creates new form HlavniOkno */
    1.26 +    public HlavniOkno() {
    1.27 +	initComponents();
    1.28 +    }
    1.29 +
    1.30 +    /** This method is called from within the constructor to
    1.31 +     * initialize the form.
    1.32 +     * WARNING: Do NOT modify this code. The content of this method is
    1.33 +     * always regenerated by the Form Editor.
    1.34 +     */
    1.35 +    @SuppressWarnings("unchecked")
    1.36 +    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    1.37 +    private void initComponents() {
    1.38 +
    1.39 +        jButton1 = new javax.swing.JButton();
    1.40 +        jTextField1 = new javax.swing.JTextField();
    1.41 +
    1.42 +        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    1.43 +
    1.44 +        jButton1.setText(":-)");
    1.45 +
    1.46 +        jTextField1.setText("jTextField1");
    1.47 +
    1.48 +        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    1.49 +        getContentPane().setLayout(layout);
    1.50 +        layout.setHorizontalGroup(
    1.51 +            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    1.52 +            .addGroup(layout.createSequentialGroup()
    1.53 +                .addContainerGap()
    1.54 +                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    1.55 +                    .addComponent(jButton1, javax.swing.GroupLayout.Alignment.TRAILING)
    1.56 +                    .addComponent(jTextField1, javax.swing.GroupLayout.DEFAULT_SIZE, 388, Short.MAX_VALUE))
    1.57 +                .addContainerGap())
    1.58 +        );
    1.59 +        layout.setVerticalGroup(
    1.60 +            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    1.61 +            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
    1.62 +                .addContainerGap()
    1.63 +                .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
    1.64 +                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 234, Short.MAX_VALUE)
    1.65 +                .addComponent(jButton1)
    1.66 +                .addContainerGap())
    1.67 +        );
    1.68 +
    1.69 +        pack();
    1.70 +    }// </editor-fold>//GEN-END:initComponents
    1.71 +
    1.72 +    /**
    1.73 +     * @param args the command line arguments
    1.74 +     */
    1.75 +    public static void main(String args[]) {
    1.76 +	nastavLaF();
    1.77 +
    1.78 +	java.awt.EventQueue.invokeLater(new Runnable() {
    1.79 +
    1.80 +	    public void run() {
    1.81 +		new HlavniOkno().setVisible(true);
    1.82 +	    }
    1.83 +	});
    1.84 +    }
    1.85 +
    1.86 +    private static void nastavLaF() {
    1.87 +	try {
    1.88 +	    UIManager.setLookAndFeel(new NimbusLookAndFeel());
    1.89 +	} catch (UnsupportedLookAndFeelException e) {
    1.90 +	    log.log(Level.FINE, "Nepodařilo se načíst LaF. Nevadí.");
    1.91 +	}
    1.92 +    }
    1.93 +    // Variables declaration - do not modify//GEN-BEGIN:variables
    1.94 +    private javax.swing.JButton jButton1;
    1.95 +    private javax.swing.JTextField jTextField1;
    1.96 +    // End of variables declaration//GEN-END:variables
    1.97 +}