import java.awt.*; import java.applet.*; public class DisplayImage extends Applet { Image picture; public void init() { picture = getImage(getDocumentBase(),"viji.jpg"); } public void paint(Graphics g) { g.drawImage(picture, 30,30, this); } }
Standard input is empty
Main.java:3: error: class DisplayImage is public, should be declared in a file named DisplayImage.java public class DisplayImage extends Applet { ^ 1 error
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!