Mercurial > cgi-bin > hgweb.cgi > ImagePrep
diff src/name/blackcap/imageprep/Menus.kt @ 31:99a0eb385c9a default tip
Work around annoying Swing glitch.
author | David Barts <n5jrn@me.com> |
---|---|
date | Sat, 20 Aug 2022 09:19:49 -0700 |
parents | 098c4f5507c7 |
children |
line wrap: on
line diff
--- a/src/name/blackcap/imageprep/Menus.kt Mon Jun 13 11:31:49 2022 -0700 +++ b/src/name/blackcap/imageprep/Menus.kt Sat Aug 20 09:19:49 2022 -0700 @@ -139,6 +139,11 @@ currentDirectory = currentOutputDirectory selectedFile = File(currentOutputDirectory, outName) } + /* swing glitch workaround from https://stackoverflow.com/questions/14640103/jfilechooser-not-showing-up */ + if (!chooser.isVisible()) { + chooser.setVisible(true) + chooser.requestFocus() + } if (chooser.showSaveDialog(Application.mainFrame) != JFileChooser.APPROVE_OPTION) { return }