Me n My Programming

If Only I Have TIme

Marama Code 117 ~ How to automatically create a shape

Hi again. Do you need to create a shape after a certain action? I do. So I used this code to create a new shape automatically:

MaramaShape myNewShape = createNewShape(shapeType, shapeXPossition, shapeYPossition, shapeWidth, shapeHeight);

The code above will automatically create a new shape. If you want to add the shape information, such as name, you can use this code:

myNewShape.setPropertyValue(“name”, “New Shape Name”);

 

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 August 15, 2011 by in Java, Life on Marama.
%d bloggers like this: