• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

XML backed JTable

 
Ranch Hand
Posts: 39
Netbeans IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Netbeans IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic