ok

Wednesday, 11 November 2015

Contoh program java pakai JOPTIONPANE

PAKAI JOPTIONPANE

import javax.swing.*;
public class Pakai_JOptionPane {
     public static void main(String[] args){
     String nama,stb;
     int tugas,mid,uas;
         stb = JOptionPane.showInputDialog("Masukkan STB");
         nama = JOptionPane.showInputDialog("Masukkan Nama");
         tugas = Integer.parseInt(JOptionPane.showInputDialog("Masukkan Nilai Tugas"));
         mid = Integer.parseInt(JOptionPane.showInputDialog("Masukkan Nilai MID"));
         uas = Integer.parseInt(JOptionPane.showInputDialog("Masukkan Nilai Final"));
         JOptionPane.showMessageDialog(null,"STB = "+stb+"\n"+"Nama = "+nama
         +"\n"+"Nilai Tugas = "+tugas+"\n"+"Nilai MID = "+mid+"\n"+"Nilai Final = "+uas);     
     }
}
Share:

Baca Juga Artikel

Like

Rusdyanha.com