Vytvoření projektu v Netbeans.
4 * Created on 30.12.2009, 2:22:41
6 package cz.frantovo.abcDrupal.gui;
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;
18 public class HlavniOkno extends javax.swing.JFrame {
20 private static final Logger log = Logger.getLogger(HlavniOkno.class.getName());
22 /** Creates new form HlavniOkno */
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.
32 @SuppressWarnings("unchecked")
33 // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
34 private void initComponents() {
36 jButton1 = new javax.swing.JButton();
37 jTextField1 = new javax.swing.JTextField();
39 setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
41 jButton1.setText(":-)");
43 jTextField1.setText("jTextField1");
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()
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))
56 layout.setVerticalGroup(
57 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
58 .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
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)
67 }// </editor-fold>//GEN-END:initComponents
70 * @param args the command line arguments
72 public static void main(String args[]) {
75 java.awt.EventQueue.invokeLater(new Runnable() {
78 new HlavniOkno().setVisible(true);
83 private static void nastavLaF() {
85 UIManager.setLookAndFeel(new NimbusLookAndFeel());
86 } catch (UnsupportedLookAndFeelException e) {
87 log.log(Level.FINE, "Nepodařilo se načíst LaF. Nevadí.");
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