So a couple days ago I had several working Java applications using the Swing library, JFrame in particular. They all worked perfectly fine and now they all throw this exception:
java.awt.headlessexception
I don't know what changed maybe my Java version got updated by accident.
Thanks for any help you can offer.
EDIT:
Here's a small piece of code that gives me the exception.
import javax.swing.JFrame;
public class test {
public static JFrame frame;
public static void main(String[] args) {
frame = new JFrame("test");
frame.setVisible(true);
frame.setLocationRelativeTo(null);
}
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…