alt/text gambar

Home

Laman

Rabu, 03 Juli 2013

UAS


package ujianuas;


public class ujian extends javax.swing.JFrame {
   
  
    public ujian() {
        initComponents();
    }
   
  
    private void initComponents() {

        RadioButton1 = new javax.swing.JButton();
        RadioButton2 = new javax.swing.JButton();
        CheckBox1 = new javax.swing.JCheckBox();
        CheckBox2 = new javax.swing.JCheckBox();
        jLabel1 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        RadioButton1.setText("jButton1");

        RadioButton2.setText("jButton2");

        CheckBox1.setText("jCheckBox1");

        CheckBox2.setText("jCheckBox2");

        jLabel1.setText("Easy CSS3 Checkboxes and Radio Buttons");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(27, 27, 27)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(CheckBox2)
                    .addComponent(CheckBox1)
                    .addComponent(RadioButton2)
                    .addComponent(RadioButton1)
                .addContainerGap(292, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(184, Short.MAX_VALUE)
                .addComponent(jLabel1)
                .addGap(182, 182, 182))
    );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addGap(24, 24, 24)
                .addComponent(jLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 52, Short.MAX_VALUE)
                .addComponent(CheckBox2)
                .addGap(18, 18, 18)
                .addComponent(CheckBox1)
                .addGap(39, 39, 39)
                .addComponent(RadioButton1)
                .addGap(29, 29, 29)
                .addComponent(RadioButton2)
                .addGap(32, 32, 32))
        );

        pack();
    }
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new ujian().setVisible(true);
            }
        });
    }
   
  
    private javax.swing.JButton RadioButton1;
    private javax.swing.JButton RadioButton2;
    private javax.swing.JCheckBox CheckBox1;
    private javax.swing.JCheckBox CheckBox2;
    private javax.swing.JLabel jLabel1;
 
   
}