Results 1 to 7 of 7
Like Tree3Likes
  • 1 Post By doWhile
  • 2 Post By Fubarable

Thread: Editable JTable

  1. #1
    ellias2007 is offline Member
    Join Date
    Feb 2010
    Posts
    25
    Rep Power
    0

    Default Editable JTable

    in mu Jtable when i click a cell and change the value inside, the JTable does NOT save the value, (when i come back to the Jtable i find the OLD value and not the new one),
    Please help me to make my JTable editable, so when i change the value in any cell this value is saved when i leave this cell...
    Thanks to any help

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default Re: Editable JTable

    Make sure that in your table's model, the column or cell that you want to be editable is in fact editable. This can be done by overriding the isCellEditable(boolean editable) method. The JTable tutorial will explain the details.

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,189
    Rep Power
    19

    Default Re: Editable JTable

    Go through this blog post by camickr: Table Stop Editing Java Tips Weblog

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  4. #4
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,642
    Rep Power
    6

    Default Re: Editable JTable

    Cross posted at Editable JTable
    Fubarable likes this.

  5. #5
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default Re: Editable JTable

    Quote Originally Posted by doWhile View Post
    Cross posted at Editable JTable
    Thanks. I hope the original poster reads your links in the cross-post.

  6. #6
    ellias2007 is offline Member
    Join Date
    Feb 2010
    Posts
    25
    Rep Power
    0

    Default Re: Editable JTable

    Sorry, but i already put my question in 2 forums in order to get a good simple example -or answer- quickly and clearly... and although, i did not get it yet ... )-:
    Last edited by ellias2007; 06-02-2012 at 11:25 PM.

  7. #7
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default Re: Editable JTable

    Quote Originally Posted by ellias2007 View Post
    Sorry, but i already put my question in 2 forums in order to get a good simple example -or answer- quickly and clearly... and although, i did not get it yet ... )-:
    1) There is good simple example code in the tutorial linked to above. If you don't understand the tutorial, please ask us to help you with whatever it is that is confusing you. It's not really in your or our best interest to have us fully re-write a tutorial just for you when there are decent ones already available.
    2) We answer questions as volunteers and on our free time, and we appreciate it greatly if you show respect for this. It can be very frustrating for us to spend time answering a question only to find out later that it had already been answered in a cross post. This means that it's OK to cross-post your question on multiple sites, but if you do so, please have the courtesy to let us know.
    doWhile and DarrylBurke like this.

Similar Threads

  1. SWT Tree editable??
    By m00g33k in forum SWT / JFace
    Replies: 0
    Last Post: 06-23-2011, 10:40 AM
  2. Set JTextField editable
    By mikhl in forum New To Java
    Replies: 3
    Last Post: 03-28-2011, 06:49 PM
  3. editable row in jxtable
    By new2java2009 in forum New To Java
    Replies: 0
    Last Post: 12-30-2010, 07:43 PM
  4. PDF - Editable/Writable
    By ananddevaraj in forum Java Servlet
    Replies: 0
    Last Post: 06-05-2010, 10:46 AM
  5. How to make the column of Jtable editable
    By man4ish in forum AWT / Swing
    Replies: 1
    Last Post: 01-06-2010, 03:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •