Guide to Object-oriented Programming With Java (Buffalo State College Version)
Chapter 16: Using WindowBuilder to Create GUI Applications
Java provides a number or robust libraries for creating Graphical User Interfaces (GUIs). The include the java.awt.* and javax.swing.* libraries.
Adding WindowBuilder to Eclipse
Before you can work with a MySQL database using Java you need to create a connection to your database. First, you need to import java.sql.* the Java SQL utilities. Next you need to use try/catch to setup the SQl driver. Then you need to setup the variables that store the server name, database name, your username for that database, your password for that database, and the SQL Query string:
Once you have your driver and variables setup you can attempt to make a connection, execute your query, and print out the results:
You can safely ignore that warning about the bscacad3.buffalostate.edu server not having a secure certificate installed.
Task - Create a Java Table Page From a MySQL Table