• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XML backed JTable

 
Charles Burton
Ranch Hand
Posts: 39
Java Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, before I describe what I'm trying to do I'll give my standard disclaimer. I'm coding to java 1.4 and will not be upgrading for a while. All code posted is handjammed in from a system that is airgapped and may have typos and not be as complete as I would like to make it.

Now, on to what I'm trying to do. I'm trying to make a JTable where one row is backed by a org.w3c.dom.Node. I want to be able to parse that node's attributes/values into the cells for editing. The editing will be done by different component types including JComboBoxes, JTextFields, and JCheckBoxes. Editing changes will be made using these components and reflected in the Node's attributes/values. Let me show you what I have so far.




Sample XML Node

 
Paul Clapham
Sheriff
Posts: 21322
32
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't update the backing store based on what happens in the cell editor. You should update it based on what happens in the setValueAt() method of the table model.
 
Charles Burton
Ranch Hand
Posts: 39
Java Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:You don't update the backing store based on what happens in the cell editor. You should update it based on what happens in the setValueAt() method of the table model.


Thanks, that got me on the right track. I'll post some code once I figure it all out.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic