I have a JTable with a predefined model
how to ask the model to insert a specific column in a specific position ?
so i want something like : DefaultTableModel.insertRow(int,Object[]) for columns
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Is it really necessary to add the column in your
TableModelat a specific index ? You can more easily adjust the column order in the view (theJTable) as documented in the class javadoc ofJTableThis is achieved by using the
JTable#moveColumnmethod.Adding a column to your
DefaultTableModelis done calling theDefaultTableModel#addColumnmethod