com.fg.util
Class FLoader

java.lang.Object
  extended bycom.fg.util.FLoader

public class FLoader
extends java.lang.Object

FLoader class loads image resources which are stored within java packages. It doesn't have limitations of the Class.getResource(String) and works well within java Web Start applications.

Version:
1.0
Author:
Felix Golubov

Constructor Summary
FLoader()
           
 
Method Summary
static javax.swing.ImageIcon getIcon(java.lang.Object obj, java.lang.String resource)
          Loads ImageIcon from the package which passed object belongs to.
static java.awt.Image getImage(java.lang.Object obj, java.lang.String resource)
          Loads Image from the package which passed object belongs to.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FLoader

public FLoader()
Method Detail

getIcon

public static javax.swing.ImageIcon getIcon(java.lang.Object obj,
                                            java.lang.String resource)
Loads ImageIcon from the package which passed object belongs to.

Parameters:
obj - any java object from the package where the image file resides
resource - a short name of the image file
Returns:
an ImageIcon object

getImage

public static java.awt.Image getImage(java.lang.Object obj,
                                      java.lang.String resource)
Loads Image from the package which passed object belongs to.

Parameters:
obj - any java object from the package where the image file resides
resource - a short name of the image file
Returns:
an Image object