【发布时间】:2014-01-30 13:17:05
【问题描述】:
我在一个JFrame里面有两个internalframes Operation和showOperation,我想知道在制作Operation之后如何更新showOperation,例如:
我试过了
showOperation.repaint();
但是不行,我也试过了
showOperation.dispose();
之后
showOperation.setVisible(true);
但不起作用 我如何更新这个内部框架?
更多细节,
我有这门课
public class ShowAssistance {
public static JInternalFrame frame = new JInternalFrame();
.
.
.
public ShowAssistance() {
showProducts();
}
public void showProducts(){
//add the internalframe to the mainframe of the application as explained above
mainFrame.getframe().add(frame);
}
当我用来更新内部框架时这个类
public class update{
update(){
showMeUpdate();
} public void showMeUpdate(){
//after some operations i do
ShowAssistance.frame.repaint();
}
【问题讨论】:
-
您的问题让我们有些沮丧,因为您遗漏了很多重要信息。请帮助我们提供更多信息和代码,最好是mcve(请查看链接)。
-
请查看我的回答,谢谢!