Screen Dimensions

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Screen Dimensions

GAUTAM SHANKAR
Hi,

getScreenSize gives me the dimensions in a macro just fine. However, I'm
using java to create a plugin and this function gives me the dimensions as
object Dimension.
How do I get them as Integers or convert them to integers?

-Gautam
Reply | Threaded
Open this post in threaded view
|

Re: Screen Dimensions

ctrueden
Hi Gautam,

Try this:
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
int width = dim.width;
int height = dim.height;

-Curtis

On Thu, Aug 5, 2010 at 4:58 PM, GAUTAM SHANKAR <[hidden email]> wrote:

> Hi,
>
> getScreenSize gives me the dimensions in a macro just fine. However, I'm
> using java to create a plugin and this function gives me the dimensions as
> object Dimension.
> How do I get them as Integers or convert them to integers?
>
> -Gautam
>