Here's a simple question: how to get the source of an image. The following are the codes of subclass:
import javax.swing.JComponent;
import java.awt.*;
public class PuzzleGameBoard extends JComponent {
private Image penguin;
public PuzzleGameBoard() {
penguin = ;
}
public void paintComponent(Graphics g) {
g.setColor(Color.BLACK);
g.fillRect(0, 0, getWidth(), getHeight());
g.drawImage(penguin, 30, 30, this);
}
}
I have problem printscreening my java program and my files to be uploaded due to technique limitation. But can anybody teach me the best way of getting the source of an image? Sorry to be not quite specific again..