java一些基础的类笔记

2013年1月8日 

javax.swing.JOptionPane;       (框的类)(GUI)

JOptionPane.showMessageDialog(arg0, arg1);  (对话框)


 JOptionPane.showInputDialog(arg0);(输入框)


 JOptionPane.showMessage("null","   ","   ",JOptionPane.INFORMATION_MESSAGE );(对话框)

 JOptionPane.showInputDialog(null,"  ","  ",JOptionPane.QUESTION_MESSAGE);(输入框)

使用框输入的字符串的转化:

转化int型      Integer.parseInt();

转化double型    Double.parseDouble(); 

javax.swing.JFileChooser 显示文件对话框

例:JFileChooser file = new JFileChoooser()

if(file.showOpenDialog(null) == JFileChooser.APPROVE_OPTION)

APPROVE_OPTION (表示 点击Open 按钮)

CANCEL_OPTION   (表示 点击Cancel 按钮)

 

System.currentTimeMillis()      (获取时间的类)(返回的毫秒)

Date()

Date(elapseTime:long);

toString() :String

getTime() :long

setTime(elapseTime:long) : void

 

java.util.Scanner       (输入包)

java.util.Random      (随机类)

Random()

Randon(seed:long)

nextInt() : int

nextInt(n :int) : int

nextLong() : long

nextFloat() : float

nextBoolean() : boolean

posted on 2013-01-08 22:11  邵邵  阅读(165)  评论(0编辑  收藏  举报

淘宝美工兼职招聘