Adding Icon to a JLabel
From: J. Babe (babe_jt_at_hotmail.com)
Date: 05/27/04
- Next message: Gerald Bauer: "Vexi - Visual, Extensible, XML Interfaces - Now Live"
- Previous message: Roedy Green: "Re: How to remove JFileChooser selections?"
- Next in thread: Steve W. Jackson: "Re: Adding Icon to a JLabel"
- Reply: Steve W. Jackson: "Re: Adding Icon to a JLabel"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 26 May 2004 16:01:53 -0700
I'm new to Java GUI and I'm trying to add an icon to an object that
extends a JLabel. I have the following code, but the icon doesn't
appear, I was wondering what my problem would be (paintIcon()?)
Thanks.
public class FileTarget extends javax.swing.JLabel implements
DropTargetListener, DragGestureListener {
private Vector filearr = new Vector();
public FileTarget(Icon image) {
super(image, (int)JLabel.CENTER_ALIGNMENT);
this.dTarget = new DropTarget(this, this);
}
- Next message: Gerald Bauer: "Vexi - Visual, Extensible, XML Interfaces - Now Live"
- Previous message: Roedy Green: "Re: How to remove JFileChooser selections?"
- Next in thread: Steve W. Jackson: "Re: Adding Icon to a JLabel"
- Reply: Steve W. Jackson: "Re: Adding Icon to a JLabel"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|