Nothing happens when running GUI

后端 未结 1 1389
野趣味
野趣味 2021-01-29 08:33

I\'m doing a project for my class and I\'m working on the GUI right now. I don\'t have much because, well, it\'s not showing up and it\'s infuriating. Here\'s my code.



        
相关标签:
1条回答
  • 2021-01-29 08:43

    You need to pack it and set it to be visible!

        frame.pack();
        frame.setVisible(true);
    

    As for answering your second question, why not just change the elements and repaint() the screen, if I understand you want it to be like a quiz with multiple questions, right?

    0 讨论(0)
提交回复
热议问题