

We hope to provide anyone with necessary and relevant content projects they need to practice and help in their daily programming career.


Then open the "Oracle Home Page" and login with your "username" and "password" then open "Object Explorer" then open the "reg" table the following data exists over there.TL DR We are fast becoming best open source code & projects organization - Code Projects is developed to provide interested people with resources to build their knowledge, and exchange ideas. If you want to be sure that the data was saved in the database Now provide a correct entity and clicked on submit. We have used a "clear" button so now check whether its working or not!Īfter clicking on the "clear" button the contents will be cleared as in the following. For checking password validation we provide an incorrect password first, as in the following figure. Now we provide a password validation in this application so first check for that. Right-click on the project menu then select "Run". You need to add a JAR file named "ojdbc.jar" to set up the database connection. JOptionPane.showMessageDialog(btn1, "Password Does Not Match" ).JOptionPane.showMessageDialog(btn1, "Data Saved Successfully" ).PreparedStatement ps = con.prepareStatement( "insert into reg values(?,?,?,?,?,?)" ).Connection con = DriverManager.getConnection(, "sandeep", "welcome" ).public void actionPerformed(ActionEvent e).l5 = new JLabel( "Confirm Password:" ).l1.setFont( new Font( "Serif" , Font.BOLD, 20 )).l1 = new JLabel( "Registration Form in Windows Form:" ).setTitle( "Registration Form in Java" ).setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE).public class Registration extends JFrame implements ActionListener.Now declare Frame components in a default constructor. Extends the JFrame components and implements the ActionListener.Ĭlass EmpSearchApp extends JFrame implements ActionListenerĭ. The SQL package creates the JDBC connection.ī. The AWT package provides an event handling mechanism, in other words it deals with events like "Button Click". All Swing components are defined within this package. The Swing package is used for the Swing components. In this file we use Swing components to create a registration form with password validation. This Java file is necessary for writing the code. Registration Form in Windows Forms applicationįor creating this application, we need the following files: The NetBeans IDE is used to create this application.

This article explains how to create a Registration Form in a Windows Forms application using Swing in Java.
