Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: AbstractTableModel

  1. #1
    Junior Member
    Join Date
    Oct 2011
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default AbstractTableModel

    Hello,

    I have an AbstractTableModel, I read data from database and show them in JTable. Then I'd like to edit some data inside JTable, and when I have edited it I would like to send them back by clicking a jbutton. The problem is that I can not figure out how to programm it, I've tried to rewrite setValueAt method, but my data changes in a JTable only when I change them in a database. Do you have any ideas how can I do this?

    Thank you in advance.


  2. #2
    Member
    Join Date
    Oct 2011
    Posts
    42
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Default Re: AbstractTableModel

    Have you tried to call model.fireTableDataChanged() after updating data in the model?
    It's better for me to help if you post your code here.

    java exception
    Last edited by hns1984; January 11th, 2012 at 06:52 PM.

Similar Threads

  1. Custom Table using AbstractTableModel
    By dumb_terminal in forum AWT / Java Swing
    Replies: 11
    Last Post: November 16th, 2010, 10:02 AM
  2. Difference between Arraylist and Vector in abstractTableModel ?
    By riddhik84 in forum Collections and Generics
    Replies: 2
    Last Post: November 7th, 2009, 04:22 PM