javax.swing.JOptionPane; (框的類)(GUI)
我們提供的服務(wù)有:網(wǎng)站建設(shè)、成都網(wǎng)站設(shè)計(jì)、微信公眾號(hào)開發(fā)、網(wǎng)站優(yōu)化、網(wǎng)站認(rèn)證、鲅魚圈ssl等。為上千家企事業(yè)單位解決了網(wǎng)站和推廣的問題。提供周到的售前咨詢和貼心的售后服務(wù),是有科學(xué)管理、有技術(shù)的鲅魚圈網(wǎng)站制作公司JOptionPane.showMessageDialog(arg0, arg1); (對(duì)話框)
JOptionPane.showInputDialog(arg0);(輸入框)
JOptionPane.showMessage("null"," "," ",JOptionPane.INFORMATION_MESSAGE );(對(duì)話框)
JOptionPane.showInputDialog(null," "," ",JOptionPane.QUESTION_MESSAGE);(輸入框)
使用框輸入的字符串的轉(zhuǎn)化:
轉(zhuǎn)化int型 Integer.parseInt();
轉(zhuǎn)化double型 Double.parseDouble();
javax.swing.JFileChooser 顯示文件對(duì)話框
例:JFileChooser file = new JFileChoooser()
if(file.showOpenDialog(null) == JFileChooser.APPROVE_OPTION)
APPROVE_OPTION (表示 點(diǎn)擊Open 按鈕)
CANCEL_OPTION (表示 點(diǎn)擊Cancel 按鈕)
System.currentTimeMillis() (獲取時(shí)間的類)(返回的毫秒)
Date()
Date(elapseTime:long);
toString() :String
getTime() :long
setTime(elapseTime:long) : void
java.util.Scanner (輸入包)
java.util.Random (隨機(jī)類)
Random()
Randon(seed:long)
nextInt() : int
nextInt(n :int) : int
nextLong() : long
nextFloat() : float
nextBoolean() : boolean