Document and JDBC

I'd like to create a document from a JDBC column, but, at first glance, Document seems to be way over featured for that and I was wondering if there is an easier way to bind a JTextField to a JDBC column. I know I could populate the fields from the RowSet and update the RowSet from the fields using getText and setText and I will do that if it comes down to it, but that, to me, seems like a very inelegent way of doing it. Using Document seems much cleaner and I'd rather do it that way.

If there isn't an easier way, if someone could point me to some tutorials on subclassing the AbstractDocument (or any of the Document classes for that matter) class, I'd appreciate it. All I can seem to find are classes that allow you to restrict what kind of input is allowed.

[784 byte] By [fantomx11a] at [2007-10-3 3:20:07]
# 1
Document is nothing but the M of MVC around JTextComponent.You also need V and C whether they are library class or your custom class.Your application level requirement is quite unclear from your description.
hiwaa at 2007-7-14 21:12:16 > top of Java-index,Desktop,Core GUI APIs...
# 2

I realize that. I'd like the model for the JTextField to be updated automatically when I move the cursor in the RowSet to a new row and the RowSet to be updated automatically when I make changes in the JTextField. As far as I can tell making a Document class that does this is the best way, or at least the way that seems best to me. It makes the RowSet more pluggable because all I have to do once I write the Document subclass is apply a new instance to any JTextField's Document.

fantomx11a at 2007-7-14 21:12:16 > top of Java-index,Desktop,Core GUI APIs...