Java JComponent Height getComponentHeight(JComponent component)

Here you can find the source of getComponentHeight(JComponent component)

Description

get Component Height

License

Apache License

Declaration

static private int getComponentHeight(JComponent component) 

Method Source Code

//package com.java2s;
// Licensed under the Apache License, Version 2.0 (the "License");

import javax.swing.JComponent;

public class Main {
    static private int getComponentHeight(JComponent component) {
        int height = component.getHeight();
        return (height > 0 ? height : component.getPreferredSize().height);
    }//  w  w w .  j a v  a 2 s .com
}

Related

  1. adjustHeight(JComponent comp, int height)
  2. fixHeight(JComponent c, int height)
  3. getMinimumHeight(JComponent comp)
  4. heighten(JComponent component, int px)
  5. makeEqualHeight(JComponent reference, JComponent... others)
  6. normalizeHeight(JComponent... components)