Java Swing – Record Keeping Application

This is a simple Java Swings application which can solve your problem to create and maintain data or records. With this application, you can get the clue or can modify this to develop an application such as address book and other record keeping applications in Java.

Tools used:

  • IDE: Netbeans 7.2 
  • JDK: 1.7 
  • JPA: 2.0
You need to install MySQL server to use it as a database. Please visit our page “http://oxyzium.blogspot.in/p/mysql-introduction.html” and “http://oxyzium.blogspot.in/p/mysql-commands.html” to have information on MySQL Server and to download it in case you don’t have. After successfully installing or in case you have already installed login to the root account of MySQL and create a user e.g. “xyz” with password “MySQL” and a database “reg”. Check the link “http://oxyzium.blogspot.in/p/mysql-commands.html” to know about the command for login, creating user and database.
After going through (as directed above). You need to have Netbeans IDE for editing the program code in case you want to make changes in the application and if it is already installed just extract the downloaded folder and open it in Netbeans IDE.
Here is the look of the application:
 On clicking Add Record, this windows will appear:
 After adding record:
 After going back and clicking on view:
 You can download the full code from here.

To simply run the application 

1. Extract the downloaded file.
2. Open CMD i.e command prompt.
3. Change directory to locate DBRecord.jar which can be found in the dist folder.
4. Make sure the address in cmd is upto dist folder.
5. Now type the following command:
java -jar DBRecord.jar
You will find the Java Swing Application running. In case you are not using the netbeans IDE and have not made any changes in the whole application using the IDE. Just install the MySQL server.
If you want it to perform and do the tasks it is intended follow the steps mentioned on the top.
If you are aware of JPA then experiment with persistence.xml file to make it dynamic to use any other MySQL server user name and password or any other database or by selecting different options from persistence.xml like create, drop and create and none (For tables.). Use netbeans IDE in this case to avoid unwanted errors/exceptions.