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 over 10 years ago
32
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

Similar

Java Week 5 Object Oriented Programming
Troy Bowlin
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