CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Guest

    JTable Not Updating, please help

    Hi, I am using a JTable, with two vectors, I am not using TableModel,
    just using JTable table = new Jtable(Vector data, Vector column),but now when
    I apdate, the new rows are added, this is not what I want, I want only the new data show in the table.

    final JTable jt = new JTable(data,headers);
    JScrollPane jsp = new JScrollPane(jt);
    getContentPane().add(BorderLayout.NORTH,jsp);
    getContentPane().add(BorderLayout.SOUTH,panel);





  2. #2
    Join Date
    Jan 2000
    Posts
    32

    Re: JTable Not Updating, please help

    I would like to clarify what you ask..
    Do you mean that you write the following?

    final JTable jt = new JTable(data,headers);
    JScrollPane jsp = new JScrollPane(jt);
    getContentPane().add(BorderLayout.NORTH,jsp);
    getContentPane().add(BorderLayout.SOUTH,panel);



    After you write this code, you want to add more rows into the JTAble.
    Right??

    If so, I'm quite sure that you cannot add more rows.
    Coz' the JTable is declared as final...
    So, it's the final one (JTable(data, headers)).
    You can't do any modification on it.

    If I misunderstand your question, pls let me know.






Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured