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.enter image description here

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:

  1. an array of column names , 2 dimensional array of data, or
  2. an vector of column names , vector of vectors data.

you can't create model using array , vector.


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -