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

java介面问题啦 有代码
import org.eclipse.swt.SWT;
import org.eclipse.swt.*;
import org.eclipse.swt.widgets.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.events.*;
public class test1 {
public static void main(String[] args){
int x=0;
final Display display=new Display();
final Shell shell=new Shell(display);
Button bt=new Button(shell,SWT.NONE);
bt.setText("wef");
bt.setBounds(10, 100, 100, 25);

bt.addSelectionListener(new SelectionAdapter(){
   public void widgetSelected(SelectionEvent e){
    Shell shell1=new Shell(display);
Label label=new Label(shell1,SWT.BORDER);
label.setText("dges");
label.setBounds(10, 100, 100, 25);
shell1.open();
    
   }
});
shell.open();
while (!shell.isDisposed()){
if(!display.readAndDispatch()){
display.sleep();
}
}
display.dispose();
}
}
这个SWT界面的代码 ,点击button后出现了一个界面 , 怎么把之前的界面给隐藏。

------解决方案--------------------
没有,但是应该有类似的方法吧
你去查吧