Here's how you can connect Java Applications to MySQL database in Once you have generated the JFrame form ( say login.java ) , you add the swing .