Java JScrollPane Create getScrollPane( Component innerComponent)

Here you can find the source of getScrollPane( Component innerComponent)

Description

get Scroll Pane

License

Open Source License

Declaration

public static Component getScrollPane(
                Component innerComponent)
        

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.awt.Component;

import javax.swing.JScrollPane;

public class Main {
    public static Component getScrollPane(Component innerComponent)
    /*      */{//from   w w w . j  a  v  a2  s .  co m
        /* 3190 */Component component = innerComponent;
        /* 3191 */if ((innerComponent instanceof JScrollPane)) {
            /* 3192 */return innerComponent;
            /*      */}
        /* 3194 */if ((component.getParent() != null)
                && (component.getParent().getParent() != null)
                && ((component.getParent().getParent() instanceof JScrollPane))) {
            /* 3195 */component = component.getParent().getParent();
            /* 3196 */return component;
            /*      */}
        /*      */
        /* 3199 */return null;
        /*      */}
}

Related

  1. getScrollPane(BasicComboPopup popup)
  2. getScrollPane(Component component)
  3. getScrollPane(Component component)
  4. getScrollPane(Component innerComponent)