About Me

Foto Saya
The Logic Soft
padang, sumatra barat, Indonesia
Lihat profil lengkapku

Rabu, 12 September 2012

aplikasi sederhana netbeans

latihan_pertama_biodata.java
script di bawah ini adalah sebuah contoh program aplikasi dari java netbeans


/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * latihan_pertama_biodata.java
 *
 * Created on 10 Sep 12, 18:32:17
 */

package biodata;

import javax.swing.JOptionPane;

/**
 *
 * @author Nofri Muldian
 * @serial 10101152620038
 * @since september 2012
 *
 */
public class latihan_pertama_biodata extends javax.swing.JFrame {

    /** Creates new form latihan_pertama_biodata */
    public latihan_pertama_biodata() {
        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();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        show = new javax.swing.JButton();
        exit = new javax.swing.JButton();
        id = new javax.swing.JTextField();
        hb = new javax.swing.JTextField();
        nm = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jur = new javax.swing.JTextField();
        asal = new javax.swing.JTextField();
        fac = new javax.swing.JTextField();
        jInternalFrame1 = new javax.swing.JInternalFrame();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        jButton1 = new javax.swing.JButton();
        jLabel11 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Biografy Student"); // NOI18N
        setAlwaysOnTop(true);
        setFocusTraversalPolicyProvider(true);
        setFont(new java.awt.Font("Near Manga", 1, 48)); // NOI18N
        setMinimumSize(new java.awt.Dimension(1024, 600));
        setResizable(false);
        getContentPane().setLayout(null);

        jLabel1.setFont(new java.awt.Font("Near Manga", 0, 48));
        jLabel1.setText("[ Biograffi Student ]");
        getContentPane().add(jLabel1);
        jLabel1.setBounds(130, 30, 350, 60);

        jLabel2.setFont(new java.awt.Font("Near Manga", 1, 24));
        jLabel2.setText("Hobby  ");
        getContentPane().add(jLabel2);
        jLabel2.setBounds(40, 210, 90, 40);

        jLabel3.setFont(new java.awt.Font("Near Manga", 1, 24));
        jLabel3.setText("ID No ");
        getContentPane().add(jLabel3);
        jLabel3.setBounds(40, 154, 80, 40);

        jLabel4.setFont(new java.awt.Font("Near Manga", 1, 24));
        jLabel4.setText("Name   ");
        getContentPane().add(jLabel4);
        jLabel4.setBounds(40, 100, 73, 40);

        show.setFont(new java.awt.Font("Near Manga", 1, 24)); // NOI18N
        show.setIcon(new javax.swing.ImageIcon(getClass().getResource("/biodata/img_src/ok.png"))); // NOI18N
        show.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                showActionPerformed(evt);
            }
        });
        getContentPane().add(show);
        show.setBounds(120, 440, 120, 40);

        exit.setFont(new java.awt.Font("Near Manga", 1, 24)); // NOI18N
        exit.setIcon(new javax.swing.ImageIcon(getClass().getResource("/biodata/img_src/exit.png"))); // NOI18N
        exit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                exitActionPerformed(evt);
            }
        });
        getContentPane().add(exit);
        exit.setBounds(350, 440, 120, 40);
        getContentPane().add(id);
        id.setBounds(160, 160, 360, 30);
        getContentPane().add(hb);
        hb.setBounds(160, 210, 360, 30);

        nm.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                nmActionPerformed(evt);
            }
        });
        getContentPane().add(nm);
        nm.setBounds(160, 110, 360, 30);

        jLabel5.setFont(new java.awt.Font("Near Manga", 1, 24));
        jLabel5.setText("Asal  ");
        getContentPane().add(jLabel5);
        jLabel5.setBounds(40, 370, 90, 40);

        jLabel6.setFont(new java.awt.Font("Near Manga", 1, 24));
        jLabel6.setText("Jurusan");
        getContentPane().add(jLabel6);
        jLabel6.setBounds(40, 310, 100, 40);

        jLabel7.setFont(new java.awt.Font("Near Manga", 1, 24));
        jLabel7.setText("Facultas ");
        getContentPane().add(jLabel7);
        jLabel7.setBounds(40, 260, 85, 40);
        getContentPane().add(jur);
        jur.setBounds(160, 320, 360, 30);
        getContentPane().add(asal);
        asal.setBounds(160, 370, 360, 30);

        fac.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                facActionPerformed(evt);
            }
        });
        getContentPane().add(fac);
        fac.setBounds(160, 270, 360, 30);

        jInternalFrame1.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));
        jInternalFrame1.setClosable(true);
        jInternalFrame1.setTitle("About Programer");
        jInternalFrame1.setAutoscrolls(true);
        jInternalFrame1.setFont(new java.awt.Font("Near Manga", 1, 24)); // NOI18N
        jInternalFrame1.setVisible(true);
        jInternalFrame1.getContentPane().setLayout(null);

        jLabel9.setFont(new java.awt.Font("Near Manga", 1, 18)); // NOI18N
        jLabel9.setText("Nobp : 10101152620032");
        jInternalFrame1.getContentPane().add(jLabel9);
        jLabel9.setBounds(10, 40, 300, 40);

        jLabel10.setFont(new java.awt.Font("Near Manga", 1, 18)); // NOI18N
        jLabel10.setText("WEBLOG : http://www.newbiedevil.co.cc");
        jInternalFrame1.getContentPane().add(jLabel10);
        jLabel10.setBounds(10, 100, 300, 40);

        jLabel12.setFont(new java.awt.Font("Near Manga", 1, 18)); // NOI18N
        jLabel12.setText("EMAIL : newbiedevil@gmail.com");
        jInternalFrame1.getContentPane().add(jLabel12);
        jLabel12.setBounds(10, 70, 300, 40);

        jButton1.setFont(new java.awt.Font("Near Manga", 1, 18)); // NOI18N
        jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/biodata/img_src/photo.jpg"))); // NOI18N
        jInternalFrame1.getContentPane().add(jButton1);
        jButton1.setBounds(20, 160, 260, 340);

        jLabel11.setFont(new java.awt.Font("Near Manga", 1, 18)); // NOI18N
        jLabel11.setText("NAMA : Qye Exe");
        jInternalFrame1.getContentPane().add(jLabel11);
        jLabel11.setBounds(10, 10, 300, 40);

        getContentPane().add(jInternalFrame1);
        jInternalFrame1.setBounds(530, 10, 320, 540);

        pack();
    }// </editor-fold>

    private void showActionPerformed(java.awt.event.ActionEvent evt) {                                     
        // TODO add your handling code here:
        JOptionPane.showMessageDialog(null, " " +
                "\n=[ Nama -  "+ nm.getText()+
                "\n=[ Nobp - " +id.getText()+
                "\n=[ Hobby - "+hb.getText()+
                "\n=[ Facultas - "+fac.getText()+
                "\n=[ Jurusan  - "+jur.getText()+
                "\n=[ Asal     - "+asal.getText() , "YOUR IDENTITY",
                JOptionPane.INFORMATION_MESSAGE);
}                                    

    private void exitActionPerformed(java.awt.event.ActionEvent evt) {                                     
        // TODO add your handling code here:
        this.dispose();
}                                    

    private void nmActionPerformed(java.awt.event.ActionEvent evt) {                                   
        // TODO add your handling code here:
}                                  

    private void facActionPerformed(java.awt.event.ActionEvent evt) {                                    
        // TODO add your handling code here:
}                                   

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new latihan_pertama_biodata().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify
    private javax.swing.JTextField asal;
    private javax.swing.JButton exit;
    private javax.swing.JTextField fac;
    private javax.swing.JTextField hb;
    private javax.swing.JTextField id;
    private javax.swing.JButton jButton1;
    private javax.swing.JInternalFrame jInternalFrame1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JTextField jur;
    private javax.swing.JTextField nm;
    private javax.swing.JButton show;
    // End of variables declaration

}


-->

Popular Posts

 

Entri Populer

Copyright© 2011 The Night Rider | Template Blogger Designer by : Utta' |
Template Name | Uniqx Transparent : Version 1.0 | Zero-Nine.Net