paintComponent(g);
Component view = getView();  if (view == null) return;  Point pos = getViewPosition(); Rectangle viewBounds = view.getBounds(); Rectangle portBounds = getBounds();  if (viewBounds.width == 0 || viewBounds.height == 0 || portBounds.width == 0 || portBounds.height == 0) return;  switch (getScrollMode()) {  case JViewport.BACKINGSTORE_SCROLL_MODE: paintBackingStore(g); break; case JViewport.BLIT_SCROLL_MODE: paintBlit(g); break; case JViewport.SIMPLE_SCROLL_MODE: default: paintSimple(g); break; } damaged = false;
  public void paint(Graphics g)  {    paintComponent(g);  }