* @param d a <code>Dimension</code> value
*/
private void drawSampleImage(Graphics g, Dimension d) {
try {
Toolkit toolkit = Toolkit.getDefaultToolkit();
Image img = toolkit.createImage(sampleImageFile);
MediaTracker tracker = new MediaTracker(drawingArea);
tracker.addImage(img, 0);
try {
tracker.waitForID(0);
}
catch (Exception e) {
e.printStackTrace();
}
/* bazsoft
g.drawImage(img, 300, 300,
img.getWidth(drawingArea),
img.getHeight(drawingArea),
Color.green,
drawingArea);
*/
g.drawImage(img, 10, 10,
img.getWidth(drawingArea),
img.getHeight(drawingArea),
Color.green,
drawingArea);
}
catch (Exception e) {
e.printStackTrace();