View Single Post
Old 04-15-2022, 05:22 PM   #2
MikoLone
Junior Member
 
Join Date: Apr 2022
Posts: 2
Default Had the same problem

I had the same problem this morning. In my app, this java code threw a null pointer exception for this line of code.

Code:
GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration().getBounds();
For some reason, when you have the main monitor set to one that is connected to the dock, getDefualtScreenDevice() returns null.

I was also using java 8.
MikoLone is offline   Reply With Quote