Berikut contoh script penggunaan JOption:



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

import javax.swing.JOptionPane;


/**
 *
 * @author edwand
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        String name = "";
        name=JOptionPane.showInputDialog("Input your name : ");
        String massage = "Hello "+name;
        JOptionPane.showMessageDialog(null, massage);

    }
}

Komentar

Postingan Populer