getting screen resolution

hello, is it possible to get the screen resolution of the current monitor? if so, how?

thanks!

	    int dpi= Toolkit.getDefaultToolkit().getScreenResolution();

thanks