Paintable Widgets

Description

Computer Programming (Java) Flashcards on Paintable Widgets, created by desnunan on 22/03/2014.
desnunan
Flashcards by desnunan, updated more than 1 year ago
desnunan
Created by desnunan about 11 years ago
33
0
1 2 3 4 5 (0)

Resource summary

Question Answer
What is the syntax for constructing an Image? Image image = new ImageIcon ("catzilla.jpg"). getImage(); Put this code in paintComponent() to display a JPEG
What is the syntax for putting a JPEG on a widget? graphics.drawImage (myPic,x,y,this);
How do you draw 2D graphics on a widget? Use a graphics object to paint shapes. Typical methods to call on a Graphics object are: graphics.setcolor (Color.blue); graphics.fillRect (x,y,width,height);
Show full summary Hide full summary

0 comments

There are no comments, be the first and leave one below:

Similar

Making a GUI
desnunan
Java Practice 1
Ummm No
PEGA CSSA Prep
Wendell Phipps
Getting a User Event
desnunan
Listener
desnunan
Handling Swing Component Events
desnunan
Playing with Swing Components
desnunan
Make a JScrollPane
desnunan
Java Practice 2
Ummm No
Servion - Java Questionnaire
rohit.benedict