SWT如何从一个界面调用另外一个界面?

解决方案 »

  1.   

    这样的例子很多阿被调用的界面写成
    public class BeenCall {
       Display display
       public BeenCall(Display display){
          this.display=display;
          Shell shell=new Shell(display);
          ...
    }
    构造函数中的display是调用着的display
      

  2.   

    用 new 那个界面 不行吗
      

  3.   

    传进构造函数就行了,这个方法是通用的,比如":
          private MainFrame pMainframe;//
          public TitleInternalFrame(JFrame mainFrame){//mianFrame是你要调用到的主窗口
               super("图书管理操作",true,true,true,true);    
          
               pMainframe = (MainFrame)mainFrame;//赋值就能使用了