lt.monarch.util
Class SwingUtils

java.lang.Object
  extended by lt.monarch.util.SwingUtils

public class SwingUtils
extends java.lang.Object

Utility functions for swing user interface


Constructor Summary
Constructor and Description
SwingUtils()
           
 
Method Summary
Modifier and Type Method and Description
static javax.swing.ImageIcon readImageIconFromResource(java.lang.String path)
          Loads an image file as an icon
static javax.swing.ImageIcon readImageIconFromResource(java.lang.String path, java.lang.Class<?> c)
          Loads an image as an icon using resource loader from the specified class
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwingUtils

public SwingUtils()
Method Detail

readImageIconFromResource

public static javax.swing.ImageIcon readImageIconFromResource(java.lang.String path)
Loads an image file as an icon

Parameters:
path - path to the image file to load
Returns:
image icon

readImageIconFromResource

public static javax.swing.ImageIcon readImageIconFromResource(java.lang.String path,
                                                              java.lang.Class<?> c)
Loads an image as an icon using resource loader from the specified class

Parameters:
path - path to the image file to load
c - class and its loader
Returns:
image icon