Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applets and images...

 
Paul Kater
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone.
Since about a week I am learning a bit about java. I am now trying to show an image inside an applet. I followed the directions on the site here, but they don't work for me. Instead of a working applet I see:

[paul@nwyfre java]$ javac BasicImage.java
BasicImage.java:34: ')' expected
g.drawImage=(image,3,3,this);
^
1 error

The statement that makes this happen is:

public void paint(Graphics g) {
g.drawImage=(image,3,3,this);
}

This is what is imported at the start of the code:
import java.applet.*;
import java.awt.*;

Can someone shed a bit of light, please?

Thanks.
Paul
 
Craig Wood
Ranch Hand
Posts: 1535
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Paul Kater
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Urghh... Thank you. I must be very dense today, it actually took me some time to see the = sign that I had in there...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic