有人会swt这个插件吗 用过的过来下 有分相送 写个类 然后用swt再画个画面 普通类传一个值给画面 让画面show出来 写好后整个过程告诉我就行了。。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 不太领会,给个简单的例子吧!import org.eclipse.swt.layout.GridLayout;import org.eclipse.swt.graphics.Point;import org.eclipse.swt.widgets.Shell;import org.eclipse.swt.graphics.Color;import org.eclipse.swt.widgets.Display;import org.eclipse.swt.widgets.Label;import org.eclipse.swt.SWT;import org.eclipse.swt.graphics.Rectangle;import org.eclipse.swt.graphics.Font;import org.eclipse.swt.widgets.Text;import org.eclipse.swt.widgets.Button;public class FrameLogin { Shell sShell = null; // @jve:decl-index=0:visual-constraint="10,10" private Label 用户名 = null; private Label 密码 = null; private Text text = null; private Text text1 = null; private Button button = null; private Button button1 = null; /** * This method initializes sShell */ void createSShell() { sShell = new Shell(); sShell.setText("登录"); sShell.setBackground(new Color(Display.getCurrent(), 255, 255, 255)); sShell.setSize(new Point(251, 164)); sShell.setLayout(null); 用户名 = new Label(sShell, SWT.NONE); 用户名.setFont(new Font(Display.getDefault(), "\u5b8b\u4f53", 10, SWT.BOLD)); 用户名.setBackground(new Color(Display.getCurrent(), 255, 255, 255)); 用户名.setLocation(new Point(32, 27)); 用户名.setSize(new Point(50, 18)); 用户名.setText("用户名:"); 密码 = new Label(sShell, SWT.NONE); 密码.setBackground(new Color(Display.getCurrent(), 255, 255, 255)); 密码.setFont(new Font(Display.getDefault(), "\u5b8b\u4f53", 9, SWT.BOLD)); 密码.setLocation(new Point(33, 63)); 密码.setSize(new Point(50, 18)); 密码.setText("密码:"); text = new Text(sShell, SWT.BORDER); text.setBounds(new Rectangle(92, 29, 126, 19)); text1 = new Text(sShell, SWT.BORDER); text1.setLocation(new Point(92, 62)); text1.setSize(new Point(126, 19)); button = new Button(sShell, SWT.NONE); button.setBounds(new Rectangle(32, 99, 61, 22)); button.setText("确定"); button1 = new Button(sShell, SWT.NONE); button1.setText("取消"); button1.setBounds(new Rectangle(153, 99, 61, 22)); }} 初学JDBC问题---No database selected 求帮助 为什么执行不了HelloWorld.java程序? 看一下这几题如何解决? 请问怎样写aix下的sh文件,来执行java程序(就好象windows下的bat那样) 怎样在JTextArea中使行距和字符的左右间距都为零? 问一个有关在APPLET上输入文字的问题 请教,在向Ultraedit里面拷贝文本时,中文显示为??,应该如何解决? 特急,iframe的问题!!!!!!!!!! 一道算法题,需要想出合适的算法解决 如何用java小程序获取浏览器状态信息? 如何在JTable单元格中加入一个JButton
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.Button;public class FrameLogin { Shell sShell = null; // @jve:decl-index=0:visual-constraint="10,10"
private Label 用户名 = null;
private Label 密码 = null;
private Text text = null;
private Text text1 = null;
private Button button = null;
private Button button1 = null;
/**
* This method initializes sShell
*/
void createSShell() {
sShell = new Shell();
sShell.setText("登录");
sShell.setBackground(new Color(Display.getCurrent(), 255, 255, 255));
sShell.setSize(new Point(251, 164));
sShell.setLayout(null);
用户名 = new Label(sShell, SWT.NONE);
用户名.setFont(new Font(Display.getDefault(), "\u5b8b\u4f53", 10, SWT.BOLD));
用户名.setBackground(new Color(Display.getCurrent(), 255, 255, 255));
用户名.setLocation(new Point(32, 27));
用户名.setSize(new Point(50, 18));
用户名.setText("用户名:");
密码 = new Label(sShell, SWT.NONE);
密码.setBackground(new Color(Display.getCurrent(), 255, 255, 255));
密码.setFont(new Font(Display.getDefault(), "\u5b8b\u4f53", 9, SWT.BOLD));
密码.setLocation(new Point(33, 63));
密码.setSize(new Point(50, 18));
密码.setText("密码:");
text = new Text(sShell, SWT.BORDER);
text.setBounds(new Rectangle(92, 29, 126, 19));
text1 = new Text(sShell, SWT.BORDER);
text1.setLocation(new Point(92, 62));
text1.setSize(new Point(126, 19));
button = new Button(sShell, SWT.NONE);
button.setBounds(new Rectangle(32, 99, 61, 22));
button.setText("确定");
button1 = new Button(sShell, SWT.NONE);
button1.setText("取消");
button1.setBounds(new Rectangle(153, 99, 61, 22));
}}