Guest User

Untitled

a guest
Dec 25th, 2018
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. JButton btnSignup = new JButton("Signup");
  2. btnSignup.addActionListener(new ActionListener() {
  3. public void actionPerformed(ActionEvent arg0) {
  4.  
  5. try {
  6. Class.forName("com.mysql.jdbc.Driver");
  7. Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/test", "root","");
  8. Statement stmt = con.createStatement();
  9. String sql = "Insert into logindb(User,
  10. pass) values (?,?)";
  11. catch(Exception e) {
  12. System.out.print(e);
  13.  
  14. }
  15. }
  16. }
  17. );
Add Comment
Please, Sign In to add comment