JTable data changes

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • renehv
    New Member
    • Jul 2007
    • 1

    #1

    JTable data changes

    Hi, does somebody konws how in runtime execution to change the data values in a JTable, setValueAt works only if the change is in the same table , if i want to change the table values from another component ??
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by renehv
    Hi, does somebody konws how in runtime execution to change the data values in a JTable, setValueAt works only if the change is in the same table , if i want to change the table values from another component ??
    I don't get this question fully. To change the values in the table you need an instance of that table and then you can you can call the setValueAt method.
    I don't understand the "from another component" part. Perhaps if you could explain that part.

    Comment

    • JosAH
      Recognized Expert MVP
      • Mar 2007
      • 11453

      #3
      Originally posted by renehv
      Hi, does somebody konws how in runtime execution to change the data values in a JTable, setValueAt works only if the change is in the same table , if i want to change the table values from another component ??
      Then at least you need a reference to that other component; that's all there is to it.
      If you don't have a reference to that other component you can't change other JTables.

      kind regards,

      Jos

      Comment

      Working...