我的问题是里面JScrollPane
没有显示。JTable
当我初始化一个没有JScrollPane
一切正常的表时。
如何使JScrollPane
不隐藏JTable
?
private void initComponents() {
setLayout(new GroupLayout());
add(getJComboBox0(), new Constraints(new Leading(24, 284, 12, 12), new Leading(45, 10, 10)));
add(getJLabel0(), new Constraints(new Leading(24, 12, 12), new Leading(17, 12, 12)));
add(getJButton1(), new Constraints(new Leading(320, 12, 12), new Leading(86, 10, 10)));
add(getJButton0(), new Constraints(new Leading(320, 126, 12, 12), new Leading(45, 12, 12)));
add(getJScrollPane1(), new Constraints(new Leading(25, 282, 12, 12), new Bilateral(82, 12, 26, 403)));
setSize(1200, 650);
}
private JScrollPane getJScrollPane1() {
if (jScrollPane1 == null) {
jScrollPane1 = new JScrollPane();
jScrollPane1.setViewportView(getJTable1());
}
return jScrollPane1;
}
private JTable getJTable1() {
if (testCaseTable == null) {
ProjectTableModel ptm =new ProjectTableModel();
testCaseTable = new JTable();
testCaseTable.setModel(ptm);
}
return testCaseTable;
}