What's new

Closed Help again sa java poh ty

Status
Not open for further replies.

jayjay12

Addict
Joined
Jun 13, 2015
Posts
274
Reaction
26
Points
122
Age
25
sir patulong paano ko e didisplay yung data sa next frame bali pag login ko dapat makikita ko yung info ko example name:akosikamot lastname:akosikasmot
eto code ko sa login
try{
String sql="select * from Autogenerate where username=? AND password=? ";
pst=conn.prepareStatement(sql);
pst.setString(1,username.getText());
pst.setString(2,password.getText());
rs=pst.executeQuery();
if(rs.next()){
JOptionPane.showMessageDialog(null,"username and passwword Matched");
nextframe frame = newnextframe();
frame.setVisible(true);
}
else if(attempt!=4){
JOptionPane.showMessageDialog(null,"Please Enter the Correct username and password "+attempt);
attempt++;
}
else{
JOptionPane.showMessageDialog(null,"Please Try Again ");
System.exit(0);
}
}catch(SQLException | HeadlessException e){
JOptionPane.showMessageDialog(null,e);

}
 
Status
Not open for further replies.

Similar threads

Back
Top