I am getting HeadlessException for getScreenSize() method.Please find the below sample code for more details.


Dimension dim = null;
try{
dim = Toolkit.getDefaultToolkit().getScreenSize();...