Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

display an image java

import java.awt.*;
import javax.swing.JFrame;
public class MyCanvas extends Canvas{
	public void paint(Graphics g) {
		Toolkit t = Toolkit.getDefaultToolkit();
		Image i = t.getImage("image.png");
		g.drawImage(i, 120,100,this);
	}
}
 
PREVIOUS NEXT
Tagged: #display #image #java
ADD COMMENT
Topic
Name
2+8 =