Does compose have a file chooser/picker? I could n...
# compose-desktop
h
Does compose have a file chooser/picker? I could not find anything.
i
You can use java.awt.FileDialog (it will open system file chooser): https://github.com/JetBrains/compose-jb/issues/176 (there is no Compose API for this at the moment).
t
@Igor Demin I am curious. Any reason why you suggest FileDialog instead of JFileChooser? As Compose Desktop uses Swing in several places, shouln't we do so in app code, too? ...as said, just curious...
h
Oh right. There is also swing interop. I wonder what is preferred
g
JFileChooser doesn't use system file picker
👆 1
👍 5
i
JFileChooser
uses Swing to draw UI, so it has not ideal Look&Feel (even with
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName())
).
JFileChooser
should be used only if functionality of FileDialog is not enough.
👍 2
t
@Igor Demin Sounds good, thanks. 👍
h
Thanks for the feedback guys! I appreciate it
583 Views