This method of the Device Class retrieves the device's pixel resolution (in pixels per inch).
public Dimension getPixelRes();
Returns the pixel resolution.