摘要:
1. 读properties文件 Properties props = new Properties(); try { InputStream in = new FileInputStream("dataBase.properties"); props.load(in); port = props.getProperty("port"); ip = props.getProperty("ip"); baseName = props.getProperty("ba... 阅读全文
posted @ 2014-03-27 20:49
夏之夜
阅读(275)
评论(0)
推荐(0)
摘要:
package com.caterSys.Thread;import java.text.SimpleDateFormat;import java.util.Date;import org.eclipse.swt.widgets.Display;import org.eclipse.swt.widgets.Label;public class TimeThread extends Thread { private Display display; private Label label; //要更新的控件 private boolean isStop = false;... 阅读全文
posted @ 2014-03-27 18:19
夏之夜
阅读(221)
评论(0)
推荐(0)
摘要:
Java 中给数字左边补0(1)方法一import java.text.NumberFormat;public class NumberFormatTest { public static void main(String[] args) { //待测试数据 int i = 1; //得到一个NumberFormat的实例 NumberFormat nf = NumberFormat.getInstance(); //设置是否使用分组 nf.setGroupingUsed(false); /... 阅读全文
posted @ 2014-03-27 16:22
夏之夜
阅读(26384)
评论(0)
推荐(4)
摘要:
package test;public class RegularExpressions { /** * 正则表达式 */ public static void main(String[] args) { String s1 = "^\\d+... 阅读全文
posted @ 2014-03-27 16:19
夏之夜
阅读(154)
评论(0)
推荐(0)
摘要:
import org.eclipse.swt.SWT;import org.eclipse.swt.events.SelectionAdapter;import org.eclipse.swt.events.SelectionEvent;import org.eclipse.swt.layout.G... 阅读全文
posted @ 2014-03-27 13:59
夏之夜
阅读(436)
评论(0)
推荐(0)
摘要:
GridLayout的风格GridLayout类提供了GridLayout 布局中划分网格的信息,主要通过以下几个参数进行设置。属性:NumColumns:通过“gridLayout.numColumns”属性可以设置父组件中分几列显示子组件。MakeColumnsEqualWidth:通过“gridLayout. makeColumnsEqualWidth”属性可以设置父组件中子组件是否有相同的列宽,当MakeColumnsEqualWidth为true时表示每列的列宽相等。MarginLeft:表示当前组件距离父组件左边距的像素点个数。MarginRight:表示当前组件距离父组件右边距的 阅读全文
posted @ 2014-03-27 13:57
夏之夜
阅读(1662)
评论(0)
推荐(0)

浙公网安备 33010602011771号