摘要:
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); /... 阅读全文
摘要:
package test;public class RegularExpressions { /** * 正则表达式 */ public static void main(String[] args) { String s1 = "^\\d+... 阅读全文
摘要:
import org.eclipse.swt.SWT;import org.eclipse.swt.events.SelectionAdapter;import org.eclipse.swt.events.SelectionEvent;import org.eclipse.swt.layout.G... 阅读全文
摘要:
GridLayout的风格GridLayout类提供了GridLayout 布局中划分网格的信息,主要通过以下几个参数进行设置。属性:NumColumns:通过“gridLayout.numColumns”属性可以设置父组件中分几列显示子组件。MakeColumnsEqualWidth:通过“gridLayout. makeColumnsEqualWidth”属性可以设置父组件中子组件是否有相同的列宽,当MakeColumnsEqualWidth为true时表示每列的列宽相等。MarginLeft:表示当前组件距离父组件左边距的像素点个数。MarginRight:表示当前组件距离父组件右边距的 阅读全文