0 LIKES LikeUnLike
I wrote a very simple program but the program hangs and crashes after a few seconds even though it works as its supposed toimport javax.swing.*;public class Hello { public void initGUI() { JFrame frame =new JFrame("Java app"); frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE); frame.setSize(800,600); frame.setVisible(true); } public static void main(String[] args) { javax.swing. SwingUtilities.invokeLater (new Runnable(){ public void run() { Hello hello =new Hello(); hello.initGUI(); } }); }}Any help on how to fix this would be appreciated =)
Tags:
Report (0) (0) | earlier
Latest activity: earlier. This question has 1 answers.