Here you can find the source of getHeight(ImageIcon imagen)
public static int getHeight(ImageIcon imagen)
//package com.java2s; //License from project: Open Source License import java.awt.*; import javax.swing.*; public class Main { /**//from www . j a v a 2 s . c o m * Obtiene el alto de una Image */ public static int getHeight(Image imagen) { int height = new ImageIcon(imagen).getIconHeight(); return height; } /** * Obtiene el alto de un IconImage */ public static int getHeight(ImageIcon imagen) { return imagen.getIconHeight(); } }