Sample Code Sample Code: Loading Images


imageIcon = ConsoleUtility.loadImageIcon(
        "images/foobar.gif",
        toolClass );

where toolClass is a class object that has the same codebase as the icon image to be loaded. It is typically -- but not always -- the class object of your main Tool isntance. For example, a project-wide common dialog, subclassed from JDialog, that exists in a library jar file could pass this.getClass().