diff -r 000000000000 -r 05e958e4e928 java/abc-drupal-gui/src/cz/frantovo/abcDrupal/gui/HlavniOkno.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/java/abc-drupal-gui/src/cz/frantovo/abcDrupal/gui/HlavniOkno.java Thu Dec 31 18:00:23 2009 +0100 @@ -0,0 +1,94 @@ +/* + * HlavniOkno.java + * + * Created on 30.12.2009, 2:22:41 + */ +package cz.frantovo.abcDrupal.gui; + +import com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.swing.UIManager; +import javax.swing.UnsupportedLookAndFeelException; + +/** + * + * @author fiki + */ +public class HlavniOkno extends javax.swing.JFrame { + + private static final Logger log = Logger.getLogger(HlavniOkno.class.getName()); + + /** Creates new form HlavniOkno */ + public HlavniOkno() { + initComponents(); + } + + /** This method is called from within the constructor to + * initialize the form. + * WARNING: Do NOT modify this code. The content of this method is + * always regenerated by the Form Editor. + */ + @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents + private void initComponents() { + + jButton1 = new javax.swing.JButton(); + jTextField1 = new javax.swing.JTextField(); + + setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); + + jButton1.setText(":-)"); + + jTextField1.setText("jTextField1"); + + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); + getContentPane().setLayout(layout); + layout.setHorizontalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(jButton1, javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(jTextField1, javax.swing.GroupLayout.DEFAULT_SIZE, 388, Short.MAX_VALUE)) + .addContainerGap()) + ); + layout.setVerticalGroup( + layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addContainerGap() + .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 234, Short.MAX_VALUE) + .addComponent(jButton1) + .addContainerGap()) + ); + + pack(); + }// //GEN-END:initComponents + + /** + * @param args the command line arguments + */ + public static void main(String args[]) { + nastavLaF(); + + java.awt.EventQueue.invokeLater(new Runnable() { + + public void run() { + new HlavniOkno().setVisible(true); + } + }); + } + + private static void nastavLaF() { + try { + UIManager.setLookAndFeel(new NimbusLookAndFeel()); + } catch (UnsupportedLookAndFeelException e) { + log.log(Level.FINE, "Nepodařilo se načíst LaF. Nevadí."); + } + } + // Variables declaration - do not modify//GEN-BEGIN:variables + private javax.swing.JButton jButton1; + private javax.swing.JTextField jTextField1; + // End of variables declaration//GEN-END:variables +}