Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- JButton btnSignup = new JButton("Signup");
- btnSignup.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent arg0) {
- try {
- Class.forName("com.mysql.jdbc.Driver");
- Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/test", "root","");
- Statement stmt = con.createStatement();
- String sql = "Insert into logindb(User,
- pass) values (?,?)";
- catch(Exception e) {
- System.out.print(e);
- }
- }
- }
- );
Add Comment
Please, Sign In to add comment