SHARE
TWEET

Untitled

a guest Aug 24th, 2019 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.    protected void datatable(){
  2.     Object[] baris ={"Nama","ID","Paket", "Kode Pend.", "Tgl Lahir", "Jenis Kel.", "No. KTP", "Alamat", "No. Telp", "No. Paspor", "Status", "Tgl. Daftar"};
  3.      tabmode = new DefaultTableModel (null,baris);
  4.      jTabelData.setModel(tabmode);
  5.      sql="select * from tb_pendumrah";
  6.     try{
  7.      java.sql.Statement stat = con.createStatement();
  8.      ResultSet hasil =stat.executeQuery(sql);
  9.      while (hasil.next()){
  10.          String a = hasil.getString("namajamaah");
  11.          String b = hasil.getString("idjamaah");
  12.          String c = hasil.getString("paket");
  13.          String d = hasil.getString("kodepend");
  14.          String e = hasil.getString("tgllahir");
  15.          String f = hasil.getString("jeniskelamin");
  16.          String g = hasil.getString("noktp");
  17.          String h = hasil.getString("alamat");
  18.          String i = hasil.getString("notel");
  19.          String j = hasil.getString("nopaspor");
  20.          String k = hasil.getString("status");
  21.          String l = hasil.getString("tgldaftar");
  22.          
  23.          String[] data= {a,b,c,d,e,f,g,h,i,j,k,l};
  24.         tabmode.addRow(data);
  25.      }
  26.     }catch (SQLException e){
  27.     }
  28. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top