Search Results

Search found 2 results on 1 pages for 'user269723'.

Page 1/1 | 1 

  • JTable Insert row and refresh

    - by user269723
    Hi All, I am trying to create simple application where JTable gets updated and refreshed after data is changed.Structure is as follows. 1)Class Main which contains JFrame,JTable details. 2)SampleTableModel class which extends AbstractTableModel.I am overriding most of the methods.`import javax.swing.table.; import javax.swing.event.; import java.util.*; public class SampleTableModel extends AbstractTableModel { public SampleTableModel(){ // this.addTableModelListener( } String[] columnNames = {"A","B","C","D","E"}; int[][] data = {{1,2,3,4,5},{5,6,7,8,9},{12,13,14,15,16}}; Vector dataVector = new Vector(); public Object getValueAt(int rowIndex,int columnIndex) { return data[rowIndex][columnIndex]; } public int getColumnCount(){ return 5; } public int getRowCount(){ return 3; } public String getColumnName(int columnIndex){ return columnNames[columnIndex]; } public void setValueAt(Object value,int row,int column){ data[row][column] =99; } public void notifyTable(AEMessage message){ /* * This method will be called from another class to update JTable. * */ data[0][1]=999; data[0][2]=8838; data[1][1]=8883; fireTableRowsUpdated(0,3); } } ` As you can see, notifyTable will be called from another class(which is actually a thread-which calls this method frequently) Problem is I don't see data being changed in JTable.I see only the initialized data. In the Main class- I am setting like this- RVJDataTable.setModel(new SampleTableModel());

    Read the article

  • java tool for debugging

    - by user269723
    Hi experts, Currently we are studying the java based tool which is primararily Reporting tool.It was developed in 2000/2001 period and uses many open source libraries like Apache Avalon/Mx4J.Adaptor/edu.Oswego(java concurrent package) etc. Tool uses jdk 1.3.1 and goal is to upgrade to jdk 1.5.We have also been asked to remove these 'outdated' packages and replace by standard java packages if possible. Unfortunately we have the code available for study but lacks any documentation and really difficult to track the flow(Total number of classes written might be more than 1000) during debugging. Whats the best way to understand this kind of tool? any Graphical tool to see the relationship between the classes? Thanks SR

    Read the article

1