Пример #1
0
  @Override
  public void addDirtyRegion(JComponent c, int x, int y, int w, int h) {
    try {
      throw new Exception();
    } catch (Exception exc) {
      StringBuffer sb = new StringBuffer();
      StackTraceElement[] stack = exc.getStackTrace();
      int count = 0;
      for (StackTraceElement stackEntry : stack) {
        if (count++ > 8) break;
        sb.append("\t");
        sb.append(stackEntry.getClassName() + ".");
        sb.append(stackEntry.getMethodName() + " [");
        sb.append(stackEntry.getLineNumber() + "]");
        sb.append("\n");
      }
      System.out.println("**** Repaint stack ****");
      System.out.println(sb.toString());
    }

    super.addDirtyRegion(c, x, y, w, h);
  }
 public synchronized void addDirtyRegion(JComponent component, int x, int y, int w, int h) {
   checkEDTRule(component);
   super.addDirtyRegion(component, x, y, w, h);
 }