Skip to main content

Patrick Keegan

Patrick Keegan has been writing about NetBeans IDE since just before NetBeans the company was acquired by Sun in 1999. He lives and works in Prague, Czech Republic, where he torments his colleagues with his taste in dated and marginal music.


pkeegan's blog

A Personal Data Storage Application With Embedded Java DB

Posted by pkeegan on August 30, 2008 at 6:57 AM PDT

Apologies in advance to those of you expecting a weightier post. Unfortunately, I've been busy lately, I haven't had time to come up with working examples of applications that handle things like many-to-many relationships or which display information from multiple tables in one cell.

De-modalizing the Customer Records App

Posted by pkeegan on August 7, 2008 at 10:02 AM PDT

I'm back from vacation and (almost) back up to speed, so it's time to resume with my semi-regular posting. Soon, I'd like to show an example of a many-to-many relationship and other examples with joins.

Draft of Custom Desktop Database Tutorial

Posted by pkeegan on June 24, 2008 at 9:17 AM PDT

I have published a draft of an extended tutorial on creating desktop Java applications on The tutorial is based on my recent series of blog posts. Thanks to everybody who provided questions and suggestions! A lot of them have been incorporated into the tutorial.

JTable Detail Based on JComboBox Selection

Posted by pkeegan on June 6, 2008 at 9:39 AM PDT

Another question that has come up in the course of my recent postings is how to bind a combo box selection to a JTable's elements (so that the rows of the table are determined by the selected item of the combo box).

Using Beans Binding to Search in a Table

Posted by pkeegan on June 5, 2008 at 10:42 AM PDT

Now and again someone will ask me how you can search records in a desktop database app. Here's a reasonably simple way to do so, using mechanisms that exist in Swing and the Beans Binding library. We will create a binding between the rowSorter property of the master table in the example in my previous entries and a text field that I've just added for the search string.

Passing Dialog Input to the Main View and Database

Posted by pkeegan on May 27, 2008 at 8:33 PM PDT

This is the fourth in a series of posts on creating a Java database application. In my last few posts, I started with skeleton code generated by the IDE and provided my own customizations, including adding a dialog to use for data entry and binding those fields with a table on the main form. In this post, I finish coding the connection between the dialog and the main form.

Binding JComboBox's Elements and Selected Item

Posted by pkeegan on May 22, 2008 at 7:08 PM PDT

This is part 3 in a series of posts that I'm doing to show how to use beans binding and JPA to create a Java desktop database application. In this installment, I concentrate on combo boxes, namely how to populate combo boxes from a table and then how to bind the user selection to a record. If you want to code along with me, be sure to read my previous two posts.

Beans Binding Between Separate Forms

Posted by pkeegan on May 21, 2008 at 7:45 PM PDT

Continuing from my last post, I'll show the next steps in the creation of this simple (but not too simple) client purchase application. This time, our main focus is in creating a separate dialog which we will use for data entry. We'll need to do a few tricks so that input from the dialog is propagated to the main form and then the database.

Input on a New Desktop Java Database Tutorial

Posted by pkeegan on May 13, 2008 at 9:20 AM PDT

Recently I've found time again to work on actual tutorials. I don't have anything written yet, but I have something resembling a plan, which you can find here:

Quickly Enclosing Components in a Container

Posted by pkeegan on December 21, 2007 at 1:05 PM PST

In the first comment on my last post, I was asked why there isn't a separate JPanel generated for both the master and detail views in NetBeans' Java Desktop Application template.