This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Editing table Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Editing table" Watch "Editing table" New topic

Editing table

Antony Amicone
Ranch Hand

Joined: Mar 11, 2006
Posts: 125
I want to make my jtable editable, for every edit on a cell, i want to get a joptionpane to confirm the editing.
after that i retrieve edited data with .getValueAt and i send a query UPDATE to my db and finally a firetablechanged

is it correct? if it is, how to set my jtable editable?
Jeanne Boyarsky
internet detective

Joined: May 26, 2003
Posts: 30392

This seems like move of a GUI question. Moving to our Swing forum.

[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Rob Spoor

Joined: Oct 27, 2005
Posts: 19684

I think the easiest way is to override setValueAt:

How To Ask Questions How To Answer Questions
subject: Editing table