I think soib soib can do the design as shown above nga nga anything nice like that's what the importance of a first click 2 times the log has been entered into the search text coding login
public class login extends javax.swing.JFrame { usually located at the top sob
See if dah. make on it a case of this
import java.sql.*;
import javax.swing.*;
import javax.swing.table.*;
okay sob could psti
Hereinafter looking for this kind of coding
public login() {
initComponents();
koneksi();
}
See if dah. make a case under this
public void koneksi (){
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
conn=DriverManager.getConnection("jdbc:odbc:film","root","");
cn=conn.createStatement();
}catch(Exception e){
JOptionPane.showMessageDialog(null,"koneksi belum tersambung ke database" );
System.out.println(e.getMessage());
}
}
public void cariuser (){
try {
String sql = "select * from login where username=" +
"'" + jTextField1.getText() + "' and password=" +
"'" + jPasswordField1.getText() + "'";
ResultSet rs = cn.executeQuery(sql);
if (rs.next())
{
JOptionPane.showMessageDialog(null,"data yang anda masukan betul...!!!!");
new Menu_utama().show();
this .dispose();
}
}catch (Exception e){
JOptionPane.showMessageDialog(null, "maap ada kesalahan di username/password yang anda masukan coba ulangin lagi...");
}}
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
cariuser();
}
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
this.dispose();
}
Take wrote here for free .. do not use pay-
No comments:
Post a Comment