1. DefaultListModel & JTable; how to sync the items in the DefaultListModel coderanch.comimport java.awt.*; import java.awt.event.*; import java.util.*; import javax.swing.*; import javax.swing.table.*; public class TableModelTest extends MouseAdapter { JTable table; String[] colNames; Object[][] data; public void mousePressed(MouseEvent e) { if(e.getClickCount() == 2) { Point p = e.getPoint(); int row = table.rowAtPoint(p); int viewCol = table.columnAtPoint(p); TableColumnModel colModel = table.getColumnModel(); TableColumn col = colModel.getColumn(viewCol); int modelCol = col.getModelIndex(); DefaultTableModel model = (DefaultTableModel)table.getModel(); String value ... |