Frage | Antworten |
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); |
Möchten Sie mit GoConqr kostenlos Ihre eigenen Karteikarten erstellen? Mehr erfahren.