public class ImageHelper extends Object
created on: 04.01.2014
| Constructor and Description |
|---|
ImageHelper() |
| Modifier and Type | Method and Description |
|---|---|
static ImageIcon |
createEmptyImageIcon(int width,
int height)
Creates an empty image.
|
static ImageIcon |
createMonoColoredImageIcon(Paint paint,
int width,
int height)
Creates a rectangular mono colored image.
|
static Image |
loadImage(String imageName)
Loads an image from the given path.
|
static ImageIcon |
loadImageIcon(String imageName)
Loads an image from a given path and returns it as an ImageIcon.
|
public static ImageIcon createEmptyImageIcon(int width, int height)
width - width of imageheight - height of imagepublic static ImageIcon createMonoColoredImageIcon(Paint paint, int width, int height)
paint - color of the imagewidth - width of the imageheight - height of the imagepublic static Image loadImage(String imageName)
imageName - path to imageIllegalArgumentException - when image can't be found in classpathpublic static ImageIcon loadImageIcon(String imageName)
imageName - path to imageIllegalArgumentException - when image can't be found in classpathCopyright © 2019. All rights reserved.