File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Editing table" Watch "Editing table" New topic
Author

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
Marshal

Joined: May 26, 2003
Posts: 30068
    
149

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
Sheriff

Joined: Oct 27, 2005
Posts: 19651
    
  18

I think the easiest way is to override setValueAt:


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
Don't get me started about those stupid light bulbs.
 
subject: Editing table
 
Similar Threads
Making Cells Editable in JTable
JTable
JTable Editable column issue.
edit only one column in JTable
JTable dates