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

linux查看文件內(nèi)容過濾 jFileChooser使用方法?

jFileChooser使用方法?JFileChooserjFileChooser=newJFileChooser()inti=jFileChooser.showOpenDialog(null)如果(

jFileChooser使用方法?

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

將以下代碼添加到密鑰事件監(jiān)視方法://初始化文件選擇框Jfilechooser fdialog=new Jfilechooser()//設置文件選擇框的標題fDialog.setDialogTitle設置對話框標題(“please select audio file”//彈出選擇框int returnval=fDialog.showOpenDialog文件(null)//如果選擇了文件,如果(JFileChooser.APPROVEOption==returnval){//打印文件的路徑。您可以修改位以將路徑值寫入textfield 系統(tǒng)輸出打印( fDialog.getSelectedFile文件())}

如何給jfilechooser中的打開和取消按鈕設置不同的監(jiān)?

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