In this series of three parts, we will learn how to build Java desktop GUI application that connected to MySQL database. This tutorial is quite long containing a lot of screen snapshots to make it as details as possible. The original tutorial can be found at netbeans.org. All credits must go to the original authors.
This tutorial guides you through the creation of a complete desktop database application that enables its user to browse and edit customer records and purchase history. The resulting application includes the following main features:
* A main view that enables users to browse customer records and customer purchases.
* A search field for the customer records.
* Separate dialog boxes for entering new records or modifying existing records.
* Code to interact with multiple related database tables.
NetBeans has a nice interface to connect DB, but many SQL commands are to be input as a whole sentence I made Swing application for inserting and viewing data to a table of MySQL database. The sample is very simple, available for one specific table and without deleting or updating operation
In this tutorial, you use the NetBeans IDE to create and deploy a Java Swing application that displays data from a database. The application uses the Hibernate framework as the persistence layer to retrieve POJOs (plain old Java objects) from a relational database.
The application that you build in this tutorial is a companion administration application for the DVD Store web application. This tutorial covers how to create an application that allows you to query an actor's profile based on the match with first name or last name. If you wish you can extend the application to query film details and to add/update/delete items. This tutorial uses MySQL and the Sakila database, but you can use any supported database server with Hibernate applications.
This tutorial shows how to create a desktop Java application through which you can access and update a database. The tutorial takes advantage of support in NetBeans IDE for the following technologies:
* The Java Persistence API (JPA), which helps you use Java code to interact with databases.
* Beans Binding (JSR-295), which provides a way for different JavaBeans components to have property values that are synchronized with each other. For example, you can use beans binding to keep the values of cells in a JTable visual component in synch with the values of fields in an entity class. (In turn, the entity class represents the database table.)
* The Swing Application Framework (JSR-296), which provides some useful building blocks for quickly creating desktop applications.
We will create a database CRUD (create, read, update, delete) application with a custom component used for visualizing the data (car design preview).
Fred Hamilton wrote:Ibn, seeing as how you have no experience building a GUI in java, the links you provided strike me as a little advanced. Perhaps they are not suitable for an absolute beginner to GUI programming in Java.
The part of java that is involved with creating a GUI is called Swing. A Desktop GUI like the one you displayed will make use of JFrame, JPanel, JTable, JButtons, JMenuItems, and probably JDialogs. These are all Swing components.
Data from a database is typically displayed in a JTable, and the JTable is stored in a JFrame.
Anyways, that's a simplistic view of things, I can only suggest that you learn the basics of these concepts before delving into the links you have provided above.
Look on the Internet for some introductory tutorials on java Swing programming. If you have some programming experience, then the Sun java Tutorial on this subject is appropriate. Once you understand the basics of Swing, you can move on to these other links you have provided.
Fred Hamilton wrote:I am not aware that there is very little going on with Swing. but I'm not an advanced GUI programmer by any stretch. But I'm pretty good with the basics. There's other people here who know a lot more than I do about GUIs. Perhaps if you narrowed the discussion to just GUI programming, and posted a question in the Swing.GUI forum, someone could help.