[Solved] JOptionPane Error: java.awt.HeadlessException: null

When using JOptionPane to achieve pop-up effect, an error is reported:

Solution:

1. Click and edit configuration

2. Add: -Djava.awt.headless=false In the virtual machine option box

Read More: