ImageIcon icon = createImageIcon("images/" + name + ".gif"); ImageIcon selectedIcon = createImageIcon("images/sel_" + name + ".gif");
ImageIcon icon = LayoutUtil.createImageIcon("images/" + name + ".gif"); ImageIcon selectedIcon = LayoutUtil.createImageIcon("images/sel_" + name + ".gif");
	    private JToggleButton createLayoutButton(String name, String label,	            Border normalBorder) {	        JToggleButton button = new JToggleButton();	        button.setActionCommand(label);	        // Set the image or, if that's invalid, equivalent text.	        ImageIcon icon = createImageIcon("images/" + name + ".gif");	        ImageIcon selectedIcon = createImageIcon("images/sel_" + name + ".gif");	        if (icon != null) {	            button.setIcon(icon);	            button.setSelectedIcon(selectedIcon);	            button.setBorder(normalBorder);	        } else {	            button.setText(label);	            button.setFont(button.getFont().deriveFont(Font.ITALIC));	            button.setHorizontalAlignment(JButton.HORIZONTAL);	            button.setBorder(BorderFactory.createLineBorder(Color.BLACK));	        }	        button.setToolTipText(label + " Layout");	        return button;	    }