首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2SE开发 >

java介面有关问题啦 有代码

2013-03-19 
java介面问题啦有代码import org.eclipse.swt.SWTimport org.eclipse.swt.*import org.eclipse.swt.widg

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后出现了一个界面 , 怎么把之前的界面给隐藏。
[解决办法]
没有,但是应该有类似的方法吧
你去查吧

热点排行
Bad Request.