Using JFrame as a static variable when I execute the main method this Null pointer Exception Occuers What is the Issue?
Asked
Active
Viewed 12 times
0
-
Post the exception here, not in an image. – Krzysztof Krasoń Apr 09 '16 at 14:21
-
Short answer; `JFrame frame;` is the same as `JFrame frame = null;` **not** `JFrame frame = new JFrame();`. Thus your `frame` is `null` when you attempt to invoke `setVisible(true)` – Elliott Frisch Apr 09 '16 at 14:22