Here's my code:
Main component = new Main();
JFrame frame = new JFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setPreferredSize(screenSize);
frame.getContentPane().add(component);
frame.pack();
frame.setResizable(false);
frame.setVisible(true);
component.start();
When I run this nothing happened, so I put system.outs on every line, and I concluded that it stopped at the line:
JFrame frame= new JFrame();
I am really confused at what is happening, because I have run this exact same set of code many other times, but it has only started to cause me trouble recently.
Also to note, I do not receive any error messages when running this program, it will just run and get stuck at that line, then five seconds later just close the program.
I don't think this is a problem with my code since I have used this exact sequence of code many times before.
I have ran this program with java 7 and 8, so maybe it is a computer issue, so if you have any ideas please tell me!
[EDIT]
Here is the minimum code required to reproduce the problem
public static void main(String args[]){
JFrame frame = new JFrame();
}
here is your proof: https://i.stack.imgur.com/pOEWf.png