摘要: JTable sortingimport javax.swing.JFrame;import javax.swing.JScrollPane;import javax.swing.JTable;import javax.swing.SwingUtilities;import javax.swing.table.DefaultTableModel;import javax.swing.table.TableModel;import javax.swing.table.TableRowSorter;public class JTableSortDemo { public static void 阅读全文
posted @ 2010-06-19 15:41 qiang.xu 阅读(243) 评论(0) 推荐(0) 编辑
摘要: How to operate data in JTable public boolean isRecordSelected() { return masterTable.getSelectedRow() != -1; } @Action public void newRecord() { desktopapplicationdbtest.Car c = new desktopapplicationdbtest.Car(); entityManager.persist(c); list.add(c); int row = list.size()-1; masterTable.setRowSele 阅读全文
posted @ 2010-06-19 15:40 qiang.xu 阅读(179) 评论(0) 推荐(0) 编辑
摘要: How to open a JFrame @Action public void showAboutBox() { if (aboutBox == null) { JFrame mainFrame = NumberSliderApp.getApplication().getMainFrame(); aboutBox = new NumberSliderAboutBox(mainFrame); aboutBox.setLocationRelativeTo(mainFrame); } NumberSliderApp.getApplication().show(aboutBox); } 阅读全文
posted @ 2010-06-19 15:21 qiang.xu 阅读(125) 评论(0) 推荐(0) 编辑
摘要: netbean 数据绑定http://netbeans.org/kb/docs/java/gui-binding_zh_CN.html 阅读全文
posted @ 2010-06-19 15:14 qiang.xu 阅读(136) 评论(0) 推荐(0) 编辑