Search
 
SCRIPT & CODE EXAMPLE
 

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);
	}
}
Comment

PREVIOUS NEXT
Code Example
Java :: java infinitew recursion 
Java :: java resource file 
Java :: java int to biginteger 
Java :: get random word from list java 
Java :: get certain character from string java 
Java :: Java debug log 
Java :: java remove duplicates from list by property 
Java :: Fibonacci Series Program. in java 
Java :: sorting char array in java 
Java :: how to check whether a character is vowel in java 
Java :: copy arraylist java 
Java :: turn java code to .exe 
Java :: Error: Could not find or load main class -Djava.library.path=.home.hdoop.hadoop-3.3.0.lib.native 
Java :: reading csv file in java 
Java :: java code samples 
Java :: intent filter 
Java :: how to control clip volume java 
Java :: circular textview android 
Java :: select max value from list java 
Java :: get today date in java 8 
Java :: how to check the lines in a file java scanner 
Java :: support different screen sizes android 
Java :: string to hexstring In java 
Java :: java logger 
Java :: char to int 
Java :: java put a char array into a string 
Java :: what method is use for getting the index position of a character of a string in java 
Java :: arraylist of arraylist 
Java :: check if string is uuid 
Java :: build tools java 
ADD CONTENT
Topic
Content
Source link
Name
6+7 =