Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example file picker does not work #72

Open
Daniel99j2 opened this issue Oct 20, 2024 · 0 comments
Open

Example file picker does not work #72

Daniel99j2 opened this issue Oct 20, 2024 · 0 comments

Comments

@Daniel99j2
Copy link

Daniel99j2 commented Oct 20, 2024

When using the file picker:
@entry(category = FILE,
selectionMode = JFileChooser.FILES_ONLY,
fileExtensions = {"json", "txt", "log"}, // Define valid file extensions
fileChooserType = JFileChooser.SAVE_DIALOG,
name = "I am a file!")
public static String myFile = ""; // The isFile property adds a file picker button
When pressing on the folder button, it does not open and there is an error:
[09:03:08] [Thread-20/ERROR] (FabricLoader) Uncaught exception in thread "Thread-20"
java.awt.HeadlessException: null
at java.desktop/java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:164) ~[?:?]
at java.desktop/java.awt.Window.(Window.java:553) ~[?:?]
at java.desktop/java.awt.Frame.(Frame.java:428) ~[?:?]
at java.desktop/java.awt.Frame.(Frame.java:393) ~[?:?]
at java.desktop/javax.swing.SwingUtilities$SharedOwnerFrame.(SwingUtilities.java:1925) ~[?:?]
at java.desktop/javax.swing.SwingUtilities.getSharedOwnerFrame(SwingUtilities.java:2001) ~[?:?]
at java.desktop/javax.swing.JOptionPane.getRootFrame(JOptionPane.java:1696) ~[?:?]
at java.desktop/javax.swing.JOptionPane.getWindowForComponent(JOptionPane.java:1637) ~[?:?]
at java.desktop/javax.swing.JFileChooser.createDialog(JFileChooser.java:815) ~[?:?]
at java.desktop/javax.swing.JFileChooser.showDialog(JFileChooser.java:762) ~[?:?]
at eu.midnightdust.lib.config.MidnightConfig$MidnightConfigScreen.lambda$fillList$11(MidnightConfig.java:366) ~[midnightlib-1.6.3-fabric.jar:?]
at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]

Fabric version:
0.16.7 and 0.106.0+1.21.1
Midnight version:
1.6.3-fabric
Mc version:
1.21.1 Fabric

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant