国产成人毛片视频|星空传媒久草视频|欧美激情草久视频|久久久久女女|久操超碰在线播放|亚洲强奸一区二区|五月天丁香社区在线|色婷婷成人丁香网|午夜欧美6666|纯肉无码91视频

輸入法獲取位置信息 JFileChooser中如何獲取絕對(duì)路徑?

JFileChooser中如何獲取絕對(duì)路徑?JFileChooser chooser=新建JFileChooser()如果(選擇器.showOpenDialog(幀)=JFileChooser.APP

JFileChooser中如何獲取絕對(duì)路徑?

JFileChooser chooser=新建JFileChooser()

如果(選擇器.showOpenDialog(幀)=JFileChooser.APPROVE選項(xiàng))

{

文件fo=chooser.getSelectedFile文件()

字符串絕對(duì)路徑=獲取絕對(duì)路徑()

}

jFileChooser使用方法?

JFileChooserjFileChooser=newJFileChooser()inti=jFileChooser.showOpenDialog(null)如果(i==jFileChooser.APPROVE選項(xiàng)){//打開(kāi)文件stringpath=jFileChooser.getSelectedFile文件().getAbsolutePath()字符串名稱=jFileChooser.getSelectedFile文件().getName()系統(tǒng)輸出打印(“當(dāng)前文件路徑:”路徑“n當(dāng)前文件名:”名稱)}否則{系統(tǒng)輸出打?。ā拔催x擇文件”}

JFileFilter設(shè)置只顯示文件夾和指定后綴名的文件?

Jfilechooser filechooser=newjfilechooser()//創(chuàng)建一個(gè)文件選擇器文件選擇器.setCurrentDirectory(新文件()?!啊?/設(shè)置當(dāng)前目錄filechooser.setAcceptAllFileFilterUsed已使用(false)//顯示所有文件filechooser.addChoosableFileFilter(新建)javax.swing.filechooser文件選擇器. filefilter(){public Boolean accept(file f){return true}public string getdescription(){return“所有文件(*)。*) "})