public class ImageGrabber
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID |
Constructor and Description |
---|
ImageGrabber() |
Modifier and Type | Method and Description |
---|---|
static java.awt.image.BufferedImage |
getImage(java.lang.String path)
Create an image.
|
static javax.swing.ImageIcon |
getImageIcon(java.lang.String path)
Create an image icon.
|
static javax.swing.JLabel |
getImageLabel(java.lang.String path)
Create an image label.
|
static java.awt.image.BufferedImage |
tryGetImage(java.lang.String path)
Create an image.
|
static javax.swing.ImageIcon |
tryGetImageIcon(java.lang.String path)
Create an image icon.
|
private static final long serialVersionUID
public static java.awt.image.BufferedImage getImage(java.lang.String path) throws java.io.IOException
path
- The path to the image.java.io.IOException
- If an image cannot be read correctly. Since all
image paths are hard coded, this should never
be thrown.public static javax.swing.ImageIcon getImageIcon(java.lang.String path) throws java.io.IOException
path
- The path to the image.java.io.IOException
- If an image cannot be read correctly. Since all
image paths are hard coded, this should never
be thrown.public static javax.swing.JLabel getImageLabel(java.lang.String path) throws java.io.IOException
path
- The path to the image.java.io.IOException
- If an image cannot be read correctly. Since all
image paths are hard coded, this should never
be thrown.public static java.awt.image.BufferedImage tryGetImage(java.lang.String path)
path
- The path to the image.public static javax.swing.ImageIcon tryGetImageIcon(java.lang.String path)
path
- The path to the image.