Java JComponent Container getMaxVisibleY(JComponent comp)

Here you can find the source of getMaxVisibleY(JComponent comp)

Description

get Max Visible Y

License

Open Source License

Parameter

Parameter Description
comp a parameter

Return

the maximum visible y-value in the component.

Declaration

public static int getMaxVisibleY(JComponent comp) 

Method Source Code

//package com.java2s;
//it under the terms of the GNU Affero General Public License as published by

import java.awt.Rectangle;

import javax.swing.JComponent;

public class Main {
    /**// w  w  w .j  a  v  a  2 s  .c om
     * @param comp
     * @return the maximum visible y-value in the component.
     */
    public static int getMaxVisibleY(JComponent comp) {
        final Rectangle rect = comp.getVisibleRect();
        return rect.y + rect.height - 1;
    }
}

Related

  1. getInputHint(JComponent comp)
  2. getInsetBounds(JComponent comp)
  3. getInterior(JComponent comp)
  4. getLocalInsetBounds(JComponent component)
  5. getMandatoryPanel(JComponent c)
  6. getModelObject(JComponent c)
  7. getOutermostRootPane(Component c)
  8. getOutermostRootPane(Component c)
  9. getPanelFor(JComponent comp1, JComponent comp2)