Home > Java, Life on Marama > Marama Code 121 ~ How to get or set shape size

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);

Categories: Java, Life on Marama
  1. No comments yet.
  1. No trackbacks yet.

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 )

Connecting to %s

Follow

Get every new post delivered to your Inbox.