All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonsrc.ingenias.editor.rendererxml.JLabelIcon Maven / Gradle / Ivy

Go to download

The INGENIAS Meta-Editor core. It is a set of facilities to generate an editor from a detailed xml description

There is a newer version: 1.0.9
Show newest version
package ingenias.editor.rendererxml;

import javax.swing.JLabel;
import javax.swing.Icon;
import java.awt.*;
import java.net.*;

/**
 * 

Title:

*

Description:

*

Copyright: Copyright (c) 2004

*

Company:

* @author not attributable * @version 1.0 */ public class JLabelIcon extends JLabel { public String iconName=""; public JLabelIcon() { } public String getIconName(){ return iconName; } public void setIconName(String name){ try { super.setIcon(new javax.swing.ImageIcon(new java.net.URL(name))); } catch (MalformedURLException ex) { System.err.println(name); // ex.printStackTrace(); } this.iconName=name; } public void setIcon(Icon icon){ if (icon!=null && (icon instanceof javax.swing.ImageIcon)){ this.setIconName(icon.toString()); } super.setIcon(icon); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy