Senin, 14 Januari 2013
0 komentar

Aplikasi Pengecekan Alamat Email Java



Download Aplikasi Pengecekan Alamat Email Java
 Program ini digunakan untuk mengecek apakah sebuah alamat email valid atau tidak.

cuplikan sourcecode dari aplikasi ini adalah sebagai berikut :
AppForm.java

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

/*
 * AppForm.java
 *
 * Created on Jun 21, 2011, 11:49:40 PM
 */

package kompilasiemail.komponen;

import java.awt.CardLayout;

/**
 *
 * @author fachrurozi
 */
public class AppForm extends javax.swing.JFrame {

    public PanelApp nPanelApp=new PanelApp();
    public PanelAbout nPanelAabout=new PanelAbout();

    /** Creates new form AppForm */
    public AppForm() {
        initComponents();

       setSize(700, 600);
        panelCardMain1.add(nPanelApp, "PanelApp");
        panelCardMain1.add(nPanelAabout, "PanelAbout");

        CardLayout cardlayout=(CardLayout) panelCardMain1.getLayout();
        cardlayout.show(panelCardMain1, "PanelApp");
       // initAction();
    }

  

   

   
 

    /** 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")
    //                           
    private void initComponents() {

        glassku = new usu.widget.GlassPane();
        backgroundPanel1 = new kompilasiemail.komponen.backgroundPanel();
        panelCardMain1 = new kompilasiemail.komponen.PanelCardMain();
        panelApp1 = new kompilasiemail.komponen.PanelApp();
        panelAbout1 = new kompilasiemail.komponen.PanelAbout();
        jLabel1 = new javax.swing.JLabel();
        tolbar1 = new kompilasiemail.komponen.tolbar();
        jSeparator2 = new javax.swing.JToolBar.Separator();
        buttonglass1 = new kompilasiemail.komponen.buttonglass();
        jSeparator1 = new javax.swing.JToolBar.Separator();
        buttonglass2 = new kompilasiemail.komponen.buttonglass();
        jSeparator3 = new javax.swing.JToolBar.Separator();
        buttonglass3 = new kompilasiemail.komponen.buttonglass();

        javax.swing.GroupLayout glasskuLayout = new javax.swing.GroupLayout(glassku);
        glassku.setLayout(glasskuLayout);
        glasskuLayout.setHorizontalGroup(
            glasskuLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );
        glasskuLayout.setVerticalGroup(
            glasskuLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 100, Short.MAX_VALUE)
        );

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        backgroundPanel1.setBackground(new java.awt.Color(255, 255, 204));

        panelCardMain1.setLayout(new java.awt.CardLayout());

        javax.swing.GroupLayout panelApp1Layout = new javax.swing.GroupLayout(panelApp1);
        panelApp1.setLayout(panelApp1Layout);
        panelApp1Layout.setHorizontalGroup(
            panelApp1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 539, Short.MAX_VALUE)
        );
        panelApp1Layout.setVerticalGroup(
            panelApp1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 245, Short.MAX_VALUE)
        );

        panelCardMain1.add(panelApp1, "card3");

        javax.swing.GroupLayout panelAbout1Layout = new javax.swing.GroupLayout(panelAbout1);
        panelAbout1.setLayout(panelAbout1Layout);
        panelAbout1Layout.setHorizontalGroup(
            panelAbout1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 539, Short.MAX_VALUE)
        );
        panelAbout1Layout.setVerticalGroup(
            panelAbout1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 245, Short.MAX_VALUE)
        );

        panelCardMain1.add(panelAbout1, "card4");

        jLabel1.setFont(new java.awt.Font("Courier 10 Pitch", 1, 24));
        jLabel1.setForeground(java.awt.Color.white);
        jLabel1.setText("APLIKASI PENGECEKAN ALAMAT E-MAIL");

        javax.swing.GroupLayout backgroundPanel1Layout = new javax.swing.GroupLayout(backgroundPanel1);
        backgroundPanel1.setLayout(backgroundPanel1Layout);
        backgroundPanel1Layout.setHorizontalGroup(
            backgroundPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(backgroundPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(backgroundPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(backgroundPanel1Layout.createSequentialGroup()
                        .addComponent(panelCardMain1, javax.swing.GroupLayout.DEFAULT_SIZE, 539, Short.MAX_VALUE)
                        .addContainerGap())
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, backgroundPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel1)
                        .addGap(45, 45, 45))))
        );
        backgroundPanel1Layout.setVerticalGroup(
            backgroundPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(backgroundPanel1Layout.createSequentialGroup()
                .addGap(21, 21, 21)
                .addComponent(jLabel1)
                .addGap(43, 43, 43)
                .addComponent(panelCardMain1, javax.swing.GroupLayout.DEFAULT_SIZE, 245, Short.MAX_VALUE)
                .addContainerGap())
        );

        getContentPane().add(backgroundPanel1, java.awt.BorderLayout.CENTER);

        tolbar1.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
        tolbar1.setRollover(true);
        tolbar1.setPreferredSize(new java.awt.Dimension(100, 70));
        tolbar1.add(jSeparator2);

        buttonglass1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/kompilasiemail/icon/application_view_icons.png"))); // NOI18N
        buttonglass1.setText("Aplikasi");
        buttonglass1.setFocusable(false);
        buttonglass1.setFont(new java.awt.Font("BlankOn", 1, 12));
        buttonglass1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        buttonglass1.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        buttonglass1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonglass1ActionPerformed(evt);
            }
        });
        tolbar1.add(buttonglass1);
        tolbar1.add(jSeparator1);

        buttonglass2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/kompilasiemail/icon/Information.png"))); // NOI18N
        buttonglass2.setText("About");
        buttonglass2.setFocusable(false);
        buttonglass2.setFont(new java.awt.Font("BlankOn", 1, 12));
        buttonglass2.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        buttonglass2.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        buttonglass2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonglass2ActionPerformed(evt);
            }
        });
        tolbar1.add(buttonglass2);
        tolbar1.add(jSeparator3);

        buttonglass3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/kompilasiemail/icon/exit32x32.png"))); // NOI18N
        buttonglass3.setText("Exit");
        buttonglass3.setFocusable(false);
        buttonglass3.setFont(new java.awt.Font("BlankOn", 1, 12));
        buttonglass3.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        buttonglass3.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        buttonglass3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                buttonglass3ActionPerformed(evt);
            }
        });
        tolbar1.add(buttonglass3);

        getContentPane().add(tolbar1, java.awt.BorderLayout.PAGE_START);

        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-575)/2, (screenSize.height-460)/2, 575, 460);
    }//                         

    private void buttonglass1ActionPerformed(java.awt.event.ActionEvent evt) {                                             
        // TODO add your handling code here:
        CardLayout cardlayout=(CardLayout) panelCardMain1.getLayout();
        cardlayout.show(panelCardMain1, "PanelApp");
    }                                            

    private void buttonglass2ActionPerformed(java.awt.event.ActionEvent evt) {                                             
        // TODO add your handling code here:
        CardLayout cardlayout=(CardLayout) panelCardMain1.getLayout();
        cardlayout.show(panelCardMain1, "PanelAbout");
    }                                            

    private void buttonglass3ActionPerformed(java.awt.event.ActionEvent evt) {                                             
        // TODO add your handling code here:
        System.exit(0);
    }                                            


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

    // Variables declaration - do not modify                     
    private kompilasiemail.komponen.backgroundPanel backgroundPanel1;
    private kompilasiemail.komponen.buttonglass buttonglass1;
    private kompilasiemail.komponen.buttonglass buttonglass2;
    private kompilasiemail.komponen.buttonglass buttonglass3;
    private usu.widget.GlassPane glassku;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JToolBar.Separator jSeparator1;
    private javax.swing.JToolBar.Separator jSeparator2;
    private javax.swing.JToolBar.Separator jSeparator3;
    private kompilasiemail.komponen.PanelAbout panelAbout1;
    private kompilasiemail.komponen.PanelApp panelApp1;
    private kompilasiemail.komponen.PanelCardMain panelCardMain1;
    private kompilasiemail.komponen.tolbar tolbar1;
    // End of variables declaration                   

}

Untuk lebih lengkapnya silahkan donwload file projectnya disini
 
Toggle Footer
Top