日期:2014-05-20  浏览次数:20577 次

java 怎样只在一个JFrame中调用其他类的Jframe
意思就是只显示一个窗口,例如:
class A{JFrame fa;
button b;}

class B{JFrame fb;}

点击class A的button b时,就在class A的JFrame fa,显示class B的内容

而不是
new class B
fa.setVisible(flase);

------解决方案--------------------
单例模式吧 设计模式里的
------解决方案--------------------
http://zhidao.baidu.com/question/311261601.html
像这样的
------解决方案--------------------
没明白楼主的意思。“显示class B的内容”是什么?是JFrame fb?还是fb里面的显示的内容?