Java Swing Layout Manager Event Handling Inner Classes Swing Applet Exceptions Threads Java I/O![]() Stream![]() Character Stream classes![]() Byte Stream classes![]() I/O Methods![]() Type of I/O![]() File Streams![]() Data Streams![]() Object Serialization![]() Writing and Read Object![]() Drawing Editor Revisit![]() Drawing Editor Revisit![]() The Draw Class![]() The Graphic Element Classes![]() The Element Implementation classes![]() Transient Fields Network Programming Resources | The Element Implementation classesSince the implmentation classes extends the BaseGraphicElem abstract class, there is no change to the implementation classes: package graphicalobject.impl;
import graphicalobject.BaseGraphicElem;
public class Rectangle extends BaseGraphicElem {
private int width;
private int height;
public Rectangle(int w, int h) {
width = w;
height = h;
}
public void display() {
super.display();
System.out.println(", width=" + width + ", height=" + height);
}
} |