roguehippo Posted May 17, 2016 Share Posted May 17, 2016 (edited) Hey, so while attempting to make my gui i have encountered a problem. when i call the gui to appear using gui.setvisible(true) I get a weird version where nothing pops up but it says that there is an open window in my open programs bar thing (picture for reference, the gui is the thing on window on the right). my Gui class is named "Gui" and is in the same package as the main class. i also call it by using "public Gui gui = new Gui();" at the top of main before onStart() in onStart the gui is set to visible with: "gui.setVisible(true);" its weird because i use the gui the same way i did in other scripts and it worked fine there. just wondering if anyone else has had this weird problem. Edited May 17, 2016 by roguehippo Quote Link to comment Share on other sites More sharing options...
The Hero of Time Posted May 17, 2016 Share Posted May 17, 2016 has to do with JFrame in ur gui class Quote Link to comment Share on other sites More sharing options...
GaetanoH Posted May 17, 2016 Share Posted May 17, 2016 (edited) Make sure your GUI extends JFrame Edited May 17, 2016 by GaetanoH Quote Link to comment Share on other sites More sharing options...
Explv Posted May 17, 2016 Share Posted May 17, 2016 Hey, so while attempting to make my gui i have encountered a problem. when i call the gui to appear using gui.setvisible(true) I get a weird version where nothing pops up but it says that there is an open window in my open programs bar thing (picture for reference, the gui is the thing on window on the right). my Gui class is named "Gui" and is in the same package as the main class. i also call it by using "public Gui gui = new Gui();" at the top of main before onStart() in onStart the gui is set to visible with: "gui.setVisible(true);" its weird because i use the gui the same way i did in other scripts and it worked fine there. just wondering if anyone else has had this weird problem. We will need to see some code to determine the issue. One reason could be that you have not set a size on your JFrame? gui.setMinimumSize(new Dimension(500, 500)); Quote Link to comment Share on other sites More sharing options...
liverare Posted May 19, 2016 Share Posted May 19, 2016 (edited) GUI gui; @Override public void onStart() throws InterruptedException { gui = new GUI(); } :edit: if that doesn't fix it, then I'll need to see your code. Edited May 19, 2016 by liverare Quote Link to comment Share on other sites More sharing options...
roguehippo Posted May 19, 2016 Author Share Posted May 19, 2016 The problem was that i hadnt set the default size yet. thank you everyone Quote Link to comment Share on other sites More sharing options...