![](/img/trans.png)
[英]How can I change font color and specification of additional informations of installation directory chooser
[英]How can I write a Java directory chooser?
我怎樣才能像這樣編寫目錄選擇器:
或者:
在 Java?
PS 1:我正在開發一個桌面應用程序,我在我的應用程序中使用 Swing。
PS 2:我只想列出目錄。
您可以使用 TreeTable,這是一個使用樹表的目錄掃描器,其中包含相當不錯的教程: http://java.sun.com/products/jfc/tsc/articles/treetable1/
您的第二張圖片看起來就像 JFileChooser ...
JFileChooser fileChooser = new JFileChooser(file);
fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
如果你想改變它的行為,只需創建一個擴展 JFileChooser 的 MyFileChooser class。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.