Ejemplo n.º 1
0
 /** Creates a rectangle and adds it to the DisplayFrame. */
 public void calculate() {
   // gets rectangle location
   double left = control.getDouble("xleft");
   double top = control.getDouble("ytop");
   // gets rectangle dimensions
   double width = control.getDouble("width");
   double height = control.getDouble("height");
   Drawable rectangle = new WorldRectangle(left, top, width, height);
   frame.addDrawable(rectangle);
   // frame is automatically rendered after Calculate button is pressed
 }