• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

JTable

 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a JTable. When a row is clicked on I want to be able to get the value of column "A". This works. The problem occurs when the user moves the column "A" around, such that the order would be "B", "C", "A", "D". I tried this :

table.getValueAt(table.getSelectedRow(),
table.getColumn("A").getModelIndex());
The problem is that the model index for "A" is always 0.
table.getValue at appears to be using the column number to refer to how the columns appear on the screen.
How would I be able to get the value I want?
Any ideas?

[This message has been edited by zoe goddard (edited June 04, 2001).]
 
I want my playground back. Here, I'll give you this tiny ad for it:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic