Tag Archives: Java
Drawing Strings in Swing using Graphics2D
I’ve started a new project again, and this time I’m working on a speed-reader application using Java (more details on that later)
One of the problems that I’ve always had with Java Swing UIs is figuring out how to directly draw centered Strings while inside of a paintComponent(Graphics g) method of some JComponent
So let’s say you’re [...]
Changing the Size of JTables
After linking up your JTable with a database through JDBC (see previous post here), you might find the need to add and remove rows to your table through the application GUI.
This can actually be done with relative ease.
JTables + JDBC: Pt. 4 Putting it all Together
This is part 4 in the series on JTables and JDBC
<< Pt. 3 Connecting to your database through JDBC
Alright, let’s put this JTable together! Using the code from the previous section, we can now populate our custom AbstractTableModel by pulling information from a remote database. Don’t worry, its a lot easier than it looks.
JTables + JDBC: Pt. 3 Connecting to your database through JDBC
This is part 3 in the series on JTables and JDBC
<< Pt. 2 Extending AbstractTableModel
Now that we have set up our empty TableModel, we’ll need to populate it with information from our database. In order to do that, we’ll first have to establish a connection to our database and query it for information.
Speed Reader