Libraryless. Click here for Pure Java version (41L/1K).
svoid showDirChooser(Component parent default null, File defaultDir, IVF1<File> action) { JFileChooser fileChooser = new JFileChooser(defaultDir); fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); fileChooser.setAcceptAllFileFilterUsed(false); if (fileChooser.showOpenDialog(parent) == JFileChooser.APPROVE_OPTION) action?.get(fileChooser.getSelectedFile()); }
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1035149 |
Snippet name: | showDirChooser |
Eternal ID of this version: | #1035149/3 |
Text MD5: | 2aa2fafb37ed095c01787e1df59316bb |
Transpilation MD5: | 776dd152f56abbbd0afbdb90ed347100 |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-04-01 21:59:28 |
Source code size: | 395 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 157 / 208 |
Version history: | 2 change(s) |
Referenced in: | [show references] |