Here you can find the source of getSize(String graphIconPath)
Parameter | Description |
---|---|
graphIconPath | a parameter |
public static int[] getSize(String graphIconPath)
//package com.java2s; //License from project: Apache License import javax.swing.ImageIcon; public class Main { /**/*from www. jav a 2 s . c o m*/ * Retrieve image size's * * @param graphIconPath * @return */ public static int[] getSize(String graphIconPath) { if (graphIconPath != null && !graphIconPath.isEmpty()) { ImageIcon image = new ImageIcon(graphIconPath); return new int[] { image.getIconWidth(), image.getIconHeight() }; } else { return new int[] { 150, 75 }; } } }