This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getting values from JTable and putting them into textfields

 
Lisa Foster
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Rahul,
This makes alot of sense. My second question is regarding Jtable,
For Example: If I click on a record in the Jtable I would like to get values from that row such as flight number,origin,destination,seats available and put these values into textfields. I am not sure on how to grab these values and to get them into a textfield.
Thanks Lisa
 
Paul Smiley
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Add a Mouse Listener - implement mouseClicked - use the table getSelectedRow
[This message has been edited by Paul Smiley (edited March 09, 2001).]
 
Lisa Foster
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok I have an anyonomous class mouselistener and I have the getSelectedRow() which shows the selected row number but what do I do from here? Is there any special functions that will allow me to extract the values from the Jtable?
Thanks Lisa
 
Paul Smiley
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
getValueAt(int,int)
 
Lisa Foster
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Pual you have been very helpful
Lisa
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic