当前位置: 技术问答>java相关
选中菜单项后,想让窗口换一个tabedpane,但有问题
来源: 互联网 发布时间:2015-06-01
本文导语: this.getContentPane().add(standardMaintenanceTabPane1, BorderLayout.CENTER); } void jMenuItem1_actionPerformed(ActionEvent e) { this.getContentPane().removeAll(); this.getContentPane().add(standardMaintenanceTabPane1, ...
this.getContentPane().add(standardMaintenanceTabPane1, BorderLayout.CENTER);
}
void jMenuItem1_actionPerformed(ActionEvent e) {
this.getContentPane().removeAll();
this.getContentPane().add(standardMaintenanceTabPane1,
BorderLayout.CENTER);
this.getContentPane().repaint();
}
void jMenuItem2_actionPerformed(ActionEvent e) {
this.getContentPane().removeAll();
this.getContentPane().add(policyParameterMaintenanceTabPanel,
BorderLayout.CENTER);
this.getContentPane().repaint();
}
问题:
点击jMenuItem2后policyParameterMaintenanceTabPanel显示不出来?!
}
void jMenuItem1_actionPerformed(ActionEvent e) {
this.getContentPane().removeAll();
this.getContentPane().add(standardMaintenanceTabPane1,
BorderLayout.CENTER);
this.getContentPane().repaint();
}
void jMenuItem2_actionPerformed(ActionEvent e) {
this.getContentPane().removeAll();
this.getContentPane().add(policyParameterMaintenanceTabPanel,
BorderLayout.CENTER);
this.getContentPane().repaint();
}
问题:
点击jMenuItem2后policyParameterMaintenanceTabPanel显示不出来?!
|
void jMenuItem2_actionPerformed(ActionEvent e) {
this.getContentPane().removeAll();
this.getContentPane().add(policyParameterMaintenanceTabPanel,
BorderLayout.CENTER);
this.getContentPane().validate();
this.getContentPane().repaint(); }
this.getContentPane().removeAll();
this.getContentPane().add(policyParameterMaintenanceTabPanel,
BorderLayout.CENTER);
this.getContentPane().validate();
this.getContentPane().repaint(); }