Anda di halaman 1dari 10

Coding tdak lengkap

* To change this license header, choose License Headers in Project Properties.

* To change this template file, choose Tools | Templates

* and open the template in the editor.

*/

package alfedrik2073;

/**

* @author lukis

*/
public class alfedrik_2073 extends javax.swing.JFrame {

/**

* Creates new form alfedrik_2073

*/

public alfedrik_2073() {

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")

// <editor-fold defaultstate="collapsed" desc="Generated Code">

private void initComponents() {

jLabel1 = new javax.swing.JLabel();

jButton1 = new javax.swing.JButton();

jLabel = new javax.swing.JLabel();

jTextField1 = new javax.swing.JTextField();

jTextField2 = new javax.swing.JTextField();

jLabel2 = new javax.swing.JLabel();

jLabel3 = new javax.swing.JLabel();


Cbx = new javax.swing.JComboBox();

Btnproses = new javax.swing.JButton();

Btnbersihkan = new javax.swing.JButton();

jScrollPane1 = new javax.swing.JScrollPane();

tabel = new javax.swing.JTable();

Btnhapus = new javax.swing.JButton();

jLabel1.setText("jLabel1");

jButton1.setText("jButton1");

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

jLabel.setFont(new java.awt.Font("Tahoma", 3, 14)); // NOI18N

jLabel.setText("Formulir Biodata");

jTextField1.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jTextField1ActionPerformed(evt);

});

jTextField2.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jTextField2ActionPerformed(evt);
}

});

jLabel2.setFont(new java.awt.Font("Tahoma", 1, 10)); // NOI18N

jLabel2.setText("NAMA :");

jLabel3.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N

jLabel3.setText("Umur :");

Cbx.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1999", "1998", "1997",


"1996" }));

Cbx.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

CbxActionPerformed(evt);

});

Btnproses.setText("Proses");

Btnproses.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

BtnprosesActionPerformed(evt);

});

Btnbersihkan.setText("Bersihkan");
tabel.setModel(new javax.swing.table.DefaultTableModel(

new Object [][] {

{null, null},

{null, null},

{null, null},

{null, null}

},

new String [] {

"nama", "umur"

){

Class[] types = new Class [] {

java.lang.String.class, java.lang.String.class

};

public Class getColumnClass(int columnIndex) {

return types [columnIndex];

});

jScrollPane1.setViewportView(tabel);

Btnhapus.setText("Hapus");

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());

getContentPane().setLayout(layout);
layout.setHorizontalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(layout.createSequentialGroup()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(layout.createSequentialGroup()

.addGap(128, 128, 128)

.addComponent(jLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 137,


javax.swing.GroupLayout.PREFERRED_SIZE))

.addGroup(layout.createSequentialGroup()

.addGap(53, 53, 53)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(layout.createSequentialGroup()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel2)

.addComponent(jLabel3))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 144,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 81,


javax.swing.GroupLayout.PREFERRED_SIZE)))

.addComponent(Cbx, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))

.addGroup(layout.createSequentialGroup()

.addGap(102, 102, 102)

.addComponent(Btnproses)

.addGap(47, 47, 47)


.addComponent(Btnbersihkan))

.addGroup(layout.createSequentialGroup()

.addContainerGap()

.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 346,


javax.swing.GroupLayout.PREFERRED_SIZE))

.addGroup(layout.createSequentialGroup()

.addGap(146, 146, 146)

.addComponent(Btnhapus)))

.addContainerGap(44, Short.MAX_VALUE))

);

layout.setVerticalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(layout.createSequentialGroup()

.addGap(43, 43, 43)

.addComponent(jLabel)

.addGap(18, 18, 18)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel2))

.addGap(18, 18, 18)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel3))

.addGap(18, 18, 18)


.addComponent(Cbx, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(Btnproses)

.addComponent(Btnbersihkan))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 105,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(31, 31, 31)

.addComponent(Btnhapus)

.addContainerGap(154, Short.MAX_VALUE)) public static void main(String args[]) {

/* Set the Nimbus look and feel */

//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">

/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.

* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html

*/

try {

for (javax.swing.UIManager.LookAndFeelInfo info :


javax.swing.UIManager.getInstalledLookAndFeels()) {

if ("Nimbus".equals(info.getName())) {

javax.swing.UIManager.setLookAndFeel(info.getClassName());

break;

} catch (ClassNotFoundException ex) {


java.util.logging.Logger.getLogger(alfedrik_2073.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);

} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(alfedrik_2073.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);

} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(alfedrik_2073.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);

} catch (javax.swing.UnsupportedLookAndFeelException ex) {

java.util.logging.Logger.getLogger(alfedrik_2073.class.getName()).log(java.util.logging.Level.SEVERE,
null, ex);

//</editor-fold>

/* Create and display the form */

java.awt.EventQueue.invokeLater(new Runnable() {

public void run() {

new alfedrik_2073().setVisible(true);

});

// Variables declaration - do not modify

private javax.swing.JButton Btnbersihkan;

private javax.swing.JButton Btnhapus;


private javax.swing.JButton Btnproses;

private javax.swing.JComboBox Cbx;

private javax.swing.JButton jButton1;

private javax.swing.JLabel jLabel;

private javax.swing.JLabel jLabel1;

private javax.swing.JLabel jLabel2;

private javax.swing.JLabel jLabel3;

private javax.swing.JScrollPane jScrollPane1;

private javax.swing.JTextField jTextField1;

private javax.swing.JTextField jTextField2;

private javax.swing.JTable tabel;

// End of variables declaration