Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void open_db() {
- try {
- Class.forName("com.mysql.jdbc.Driver");
- Con = (Connection) DriverManager.getConnection("jdbc:mysql://localhost:3306/laundryproject","root","");
- stm = (Statement) Con.createStatement();
- }catch (ClassNotFoundException | SQLException e){
- JOptionPane.showMessageDialog(null,"Koneksi gagal");
- System.out.println(e.getMessage());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement