Пример #1
0
 /**
  * Set the window size to w-by-h pixels.
  *
  * @param w the width as a number of pixels
  * @param h the height as a number of pixels
  * @throws a RunTimeException if the width or height is 0 or negative
  */
 public static void setCanvasSize(int w, int h) {
   if (w < 1 || h < 1) throw new RuntimeException("width and height must be positive");
   width = w;
   height = h;
   init();
 }
Пример #2
0
 // static initialiser
 static {
   init();
 }