Results 1 to 2 of 2
  1. #1
    nikhilat is offline Member
    Join Date
    Nov 2011
    Posts
    1
    Rep Power
    0

    Default how update jtable in java swing

    I have update each row after values enter in to this.By clicking a row it display the values that previously entered. And I am not using any database to store values.

  2. #2
    Grkn is offline Member
    Join Date
    Oct 2011
    Posts
    65
    Rep Power
    0

    Default Re: how update jtable in java swing

    jtable has renderer & editor

    renderer : displays values
    editor : edits values

    so is it editable?

    Also each swing component has a model that helps to change data
    :( I can not explain all of the stuff you can look java tutorials.

    DefaultTableModel (Java Platform SE 7 )
    //This link explains every thing

    //You have to define your model to change values.
    DefaultTableModel tableModel=new DefaultTableMode();
    table.setModel(tableModel);
    tableModel.setValueAt("HI",5,5);

    sets "HI" to cell at row=5 & column=5;

Similar Threads

  1. how tu update a JTable
    By Timmins in forum New To Java
    Replies: 0
    Last Post: 04-01-2011, 10:19 PM
  2. JTable update...
    By chyrl in forum Advanced Java
    Replies: 1
    Last Post: 01-30-2011, 02:25 PM
  3. update jtable?
    By realosso in forum New To Java
    Replies: 0
    Last Post: 08-03-2010, 11:31 AM
  4. Update the GUI in JTable
    By itaipee in forum AWT / Swing
    Replies: 3
    Last Post: 04-12-2009, 12:28 PM
  5. Java Swing JTable Simple Doubt
    By hemanthjava in forum AWT / Swing
    Replies: 1
    Last Post: 11-26-2008, 01:46 PM

Tags for this Thread

Posting Permissions

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