System.out.println("getWritingarea : " + ie.getMessage());
log.warn("getWritingarea : " + ie.getMessage());
   public Graphics2D getWritingArea(Font font) {      Graphics2D g2;      // we could be in the middle of creating the graphics because of the      //    threads, resizing etc....   so lets wait until we have one.      //    If this causes problems we should implement a thresh-hold of sorts      //    to keep an infinate loop from occurring.  So far not problems      try {         synchronized (lock) {            // wait until there is something to read            while (bi == null) {               System.out.println( " bi = null wa ");               lock.wait();            }               // we have the lock and state we're seeking            g2 = bi.createGraphics();            if (g2 != null) {               if (antialiased)                  g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,                        RenderingHints.VALUE_ANTIALIAS_ON);               g2.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING,                     RenderingHints.VALUE_COLOR_RENDER_SPEED);               g2.setRenderingHint(RenderingHints.KEY_RENDERING,                     RenderingHints.VALUE_RENDER_SPEED);               g2.setFont(font);            }            // tell waiting threads to wake up            lock.notifyAll();            return g2;         }      }      catch (InterruptedException ie) {         System.out.println("getWritingarea : " + ie.getMessage());         return null;      }   }