01: //Plik: 03_DziedziczKonstr/Main.java
02: 
03: import javax.swing.*;
04: import java.awt.Color;
05: 
06: public class Main {
07:     public static void main(String[] args) {
08:         Point pt = new Pixel(1,1);
09:         Pixel px = new Pixel(new Color(255,51,102));
10:         px.translate(5,4).scale(2,3).translate(-1,-3);
11:         System.out.println("px: " + px);
12:         System.out.println("pt: " + pt);
13: 
14:         JOptionPane.showMessageDialog(null,
15:                 "<html>px: <font color=\"#FF00FF\">" + px);
16: 
17:         System.exit(0);
18:     }
19: }