Me n My Programming

If Only I Have TIme

Marama Code 121 ~ How to get or set shape size

Today I’ll explain how to get or set shape’s size. This can be done using this code:

Dimension maramaShape_size = maramaShape.getSize();

It will return the shape’s size in Dimension. You can set the shape’s size with this code:

Dimension newSize = new Dimension(int width, int height);

maramaShape.setSize(newSize);

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Information

This entry was posted on October 3, 2011 by in Java, Life on Marama.
%d bloggers like this: