swing - JAVA jtable passing value -
i facing problem of passing value print out in jtable. trying pass data variable table getting error once trying run project. image below shown tried.
i declare these 2 variable in global.
vector<vector<object>> data = new vector<vector<object>>(); string[] headers = {"ip", "port", "destination", "port"}; i pass in value read text file data variable this:
vector<object> row = new vector<object>(); row.add(alltcp.get(x).gettcpsourceip()); row.add(alltcp.get(x).gettcpsourceport()); row.add(alltcp.get(x).gettcpdestip()); row.add(alltcp.get(x).gettcpdestport()); data.add(row); can tell me did wrong or shall in order me pass in value output table form. way, designed table in third tab.
read defaulttablemodel api.
you can create defaulttablemodel using:
- an array of column names , 2 dimensional array of data, or
- an vector of column names , vector of vectors data.
you can't create model using array , vector.
Comments
Post a Comment