Posted March 16, 20169 yr I am trying to launch a JFrame in a new thread when the client presses a key. In the constructor for my window it fails on this line setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); with this as the stacktrace [18:51:14] [Thread-15/INFO] [sTDERR]: [main.java.lidr.thread.LiDrThread:run:23]: java.lang.ArrayIndexOutOfBoundsException: 5 [18:51:14] [Thread-15/INFO] [sTDERR]: [main.java.lidr.thread.LiDrThread:run:23]: at net.minecraftforge.fml.relauncher.FMLSecurityManager.checkPermission(FMLSecurityManager.java:21) [18:51:14] [Thread-15/INFO] [sTDERR]: [main.java.lidr.thread.LiDrThread:run:23]: at java.lang.SecurityManager.checkExit(Unknown Source) [18:51:14] [Thread-15/INFO] [sTDERR]: [main.java.lidr.thread.LiDrThread:run:23]: at javax.swing.JFrame.setDefaultCloseOperation(Unknown Source) [18:51:14] [Thread-15/INFO] [sTDERR]: [main.java.lidr.thread.LiDrThread:run:23]: at main.java.lidr.thread.LightDrafterWindow.<init>(LightDrafterWindow.java:48) [18:51:14] [Thread-15/INFO] [sTDERR]: [main.java.lidr.thread.LiDrThread:run:23]: at main.java.lidr.thread.LiDrThread.run(LiDrThread.java:18) if I remove that line nothing errors but the window doesn't display. I can add more code here if people want to see it but otherwise you can see it on my github Current Project: Armerger Planned mods: Light Drafter | Ore Swords Looking for help getting a mod off the ground? Coding | Textures
March 16, 20169 yr Author Ah, I thought EXIT_ON_CLOSE would just close the thread it was in. And I didn't know that I could run it in the same thread, that will make things a little easier. Current Project: Armerger Planned mods: Light Drafter | Ore Swords Looking for help getting a mod off the ground? Coding | Textures
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.