JViewport currentView = this.getViewport();
JViewport currentView = getViewport();
    void zoomImage()    {        if (model.getRenderedImage() == null) return;        model.createDisplayedImage();        BufferedImage img = model.getDisplayedImage();        setComponentsSize(img.getWidth(), img.getHeight());        JViewport currentView = this.getViewport();        int h = img.getHeight();        int w = img.getWidth();        int viewportW = currentView.getWidth();        int viewportH = currentView.getHeight();        int x = w/2-viewportW/2;        if (x < 0) x = 0;        int y = h/2-viewportH/2;        if (y < 0) y = 0;        currentView.setViewPosition(new Point(x, y));        browserCanvas.repaint();    }