Class GuiUtils


  • public class GuiUtils
    extends Object
    Utility methods for GUI-related tasks.
    Author:
    James Murty
    • Constructor Detail

      • GuiUtils

        public GuiUtils()
    • Method Detail

      • applyIcon

        public boolean applyIcon​(Object component,
                                 String iconResourcePath)
        Loads an icon image from the classpath and sets the icon of the component.
        Parameters:
        component - the component to apply the icon to, supported components are: JMenuItem, JButton, JLabel, Frame.
        iconResourcePath - the path to an icon image in the classpath.
        Returns:
        true if the icon was found and applied to the component