CongUan
asked on
How to use JTable
Hi Experts,
Please let me know how to rerange the column with of JTable in the code.
I have the default table as below:
STT Menu Series Product
1 D 12345.. LC27
The leght of series is 14, so I want to rerange the Series column or what the column I need with the width param.
I need to add a check box to cell of rows of JTable
I do as below- see at line 2:
data[rowIndex][0] = Integer.toString(seriObj.g etSeqNumbe r());
data[rowIndex][1] =new Boolean(false); //Bolean value to add a check box to cell
data[rowIndex][2] = seriObj.getSeriCode();
data[rowIndex][3] = seriObj.getProductName();
but it cause me the java.lang.ArrayStoreExcept ion: java.lang.Boolean exception
Thank you in advance!
It is correct to add a check box to cell? please let me know the way to do this?
Please let me know how to rerange the column with of JTable in the code.
I have the default table as below:
STT Menu Series Product
1 D 12345.. LC27
The leght of series is 14, so I want to rerange the Series column or what the column I need with the width param.
I need to add a check box to cell of rows of JTable
I do as below- see at line 2:
data[rowIndex][0] = Integer.toString(seriObj.g
data[rowIndex][1] =new Boolean(false); //Bolean value to add a check box to cell
data[rowIndex][2] = seriObj.getSeriCode();
data[rowIndex][3] = seriObj.getProductName();
but it cause me the java.lang.ArrayStoreExcept
Thank you in advance!
It is correct to add a check box to cell? please let me know the way to do this?
check the data type of the array!
it should be the type of Object
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.