基本信息
源码名称:java登录界面设计(基于org.eclipse.swt)
源码大小:0.81M
文件格式:.rar
开发语言:Java
更新时间:2019-12-16
   友情提示:(无需注册或充值,赞助后即可获取资源下载链接)

     嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):78630559

本次赞助数额为: 2 元 
   源码介绍

gui界面






package com;

import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.graphics.Font;

public class Z {

Shell sShell = null;  //  @jve:decl-index=0:visual-constraint="264,-14"
private Label label1 = null;
private Label label2 = null;
private Text text1 = null;
private Text text2 = null;
private Button button = null;

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
/* Before this is run, be sure to set up the launch configuration (Arguments->VM Arguments)
* for the correct SWT library path in order to run with the SWT dlls. 
* The dlls are located in the SWT plugin jar.  
* For example, on Windows the Eclipse SWT 3.1 plugin jar is:
*       installation_directory\plugins\org.eclipse.swt.win32_3.1.0.jar
*/
Display display = Display.getDefault();
Z thisClass = new Z();
thisClass.createSShell();
thisClass.sShell.open();

while (!thisClass.sShell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
display.dispose();
}

/**
* This method initializes sShell
*/
void createSShell() {
sShell = new Shell();
sShell.setText("凉亭古木");
sShell.setImage(new Image(Display.getCurrent(), getClass().getResourceAsStream("/com/捕获.PNG")));
sShell.setSize(new Point(470, 288));
sShell.setLayout(null);
label1 = new Label(sShell, SWT.NONE);
label1.setBounds(new Rectangle(61, 16, 97, 37));
label1.setFont(new Font(Display.getDefault(), "楷体", 24, SWT.NORMAL));
label1.setText("用户名");
label2 = new Label(sShell, SWT.NONE);
label2.setBounds(new Rectangle(71, 103, 68, 38));
label2.setFont(new Font(Display.getDefault(), "楷体", 24, SWT.NORMAL));
label2.setText("密码");
text1 = new Text(sShell, SWT.BORDER);
text1.setBounds(new Rectangle(189, 11, 167, 43));
text2 = new Text(sShell, SWT.BORDER);
text2.setBounds(new Rectangle(188, 98, 172, 45));
button = new Button(sShell, SWT.NONE);
button.setBounds(new Rectangle(186, 178, 86, 39));
button.setFont(new Font(Display.getDefault(), "楷体", 14, SWT.NORMAL));
button.setText("确认注册");
}

}