Code example for JScrollPane

Methods: setMinimumSizesetPreferredSize

		TREE.addTreeSelectionListener(new OptionsTreeSelectionListener(TREE));
        //TREE.setCellRenderer(new LimeTreeCellRenderer()); 
		SCROLL_PANE = new JScrollPane(TREE);
		SCROLL_PANE.setPreferredSize(new Dimension(150, 2000));
		SCROLL_PANE.setMinimumSize(new Dimension(150, 300));
	 * Adds a new child node to one of the top-level parent nodes.  
	 * children.  Neither key can denote the root.<p> 
	 * This should only be called during tree construction. 
	 * @param parentKey the unique identifying key of the node to add as   
	 *                  well as the key for the locale-specific name for  
	 *                  the node as it appears to the user 
Contextual code suggestions in your IDE  Get Codota for Java