public void actionPerformed(ActionEvent arg0) {
if (instance.getCurrentScene() != null){
//If we want to modify the MT4j applet from the swing thread
//we should wrap the actions into an invokeLater runnable which
//will be executed the next time the mt4j thread runs.
instance.invokeLater(new Runnable() {
public void run() {
float arc = ToolsMath.getRandom(8, 25);
MTRoundRectangle r = new MTRoundRectangle(0,0,0, ToolsMath.getRandom(50, 250),ToolsMath.getRandom(50, 250), arc, arc, instance);
r.setFillColor(new MTColor(ToolsMath.getRandom(50,255),ToolsMath.getRandom(50,255),ToolsMath.getRandom(50,255)));
r.addGestureListener(DragProcessor.class, new InertiaDragAction());