Code example for JScrollPane

Methods: setViewportView

0
            } 
        }); 
    } 
 
    public void setMainPanel(JComponent comp) {
        mainPanel.setViewportView(comp);
    } 
 
    public JTree getTree() {
        return this.tree;
    } 
 
    /** 
     * Create the GUI components and layout. 
     */ 
    private void init() {// called from ctor, so must not be overridable 
        menuBar = new ReportMenuBar();
        setJMenuBar(menuBar);
 
        JPanel all = new JPanel(new BorderLayout());