In the case of a single monitor using java.awt.Toolkit.getDefaultToolkit().getScreenSize();
but In dual monitor what should I do now?
In the case of a single monitor using java.awt.Toolkit.getDefaultToolkit().getScreenSize();
but In dual monitor what should I do now?
What you want is:
GraphicsDevice[] monitors = GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices();
Which will be a list of all the monitors attached to the system.
Those GraphicsDevice objects have a suite of useful methods.