我删除了大部分GUI以保持代码简短.
我有3个JRadioButtons的buttongroup来选择我想要在我的JTable中显示的表模式,它包含在JScrollPane中
我试图使用fireTableStructureChanged(),fireTableDataChanged()也JTable.repaint()无济于事.谁能帮我?
这是一个使用我的配置运行窗口但不更新表的简单示例.
public class test1 implements ActionListener {
private boolean payrollActive = false;
private JPanel mainPanel = new JPanel();
private JTable dataTable;
private Vector<String> courseColumns = new Vector<String>();
private Vector<String> courseColumnsPay = new Vector<String>();
private Vector<String> profsColumns = new Vector<String>();
private Vector<String> offSpaceColumns = new Vector<String>();
public test1() {
//Add columns for tables
String[] courseColsPay = {"Year", "Program", "Course", "Code", "CCCode",
"Weight", "Session", "Section", "Day", "STime", "FTime",
"BookedRM", "EnrolCap", "Description", "ProfFName",
"ProfLName", …Run Code Online (Sandbox Code Playgroud)