posted 21 years ago
If you are going to add it directly to a JLabel, why not just set the icon with an ImageIcon?
Otherwise, with any other JComponent, you can override paintComponent and with something like the following:
where the variable image is of class Image. image can be loaded in the constructor using Toolkit.getDefaultToolkit().getImage( filename ), or any other way you want.
-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.