JVM Languages
lightwei.txt
Associated article: Java and Lightweight Components
Tags: JVM Languages
Published source code accompanying the article by David K. Perelman-Hall in which he discusses JDK 1.1 lightweight components that let you give programs exactly the same look-and-fell--no matter which platform hosts the VM. To examine lightweight component development, David presents his dph.awt.lightweight package. Also see LIGHTWEI.ZIP.
Java and Lightweight Components
by David K. Perelman-Hall
Listing One
package dph.awt.lightweight;
public abstract class CommonBase extends java.awt.Component {
public void addNotify() {
super.addNotify();
java.awt.Dimension d = getSize();
if( d.width == 0 || d.height == 0 ) {
setSize( this.figureMySize( ...


