Concetti di informatica e fondamenti di Java, 4 ed. Apogeo ©2007 File RectangleComponent.java 01: import java.awt.Graphics; 02: import java.awt.Graphi
{"Image DocumentName": "File RectangleComponent.java", "Image ImageDescription": "01: import java.awt.Graphics; 02: import java.awt.Graphics2D; 03: import java.awt.Rectangle; 04: import javax.swing.JComponent; 05: 06: /   07: Componente che visualizza un rettangolo che pu\u00f2 essere spostato. 08:  / 09: public class RectangleComponent extends JComponent. 10: { 11: public RectangleComponent() 12: { 13: // il rettangolo che viene disegnato dal metodo paint. 14: box = new Rectangle(BOX_X, BOX_Y, 15: BOX_WIDTH, BOX_HEIGHT); 16: } 17: 18: public void paintComponent(Graphics g) 19: { 20: super.paintComponent(g); 21: Graphics2D g2 = (Graphics2D) g;", "Image XResolution": "37", "Image YResolution": "37", "Image ResolutionUnit": "Pixels/Centimeter", "Image Software": "SlidePlayer", "Image YCbCrPositioning": "Centered"}