//OverRide //Demonstrates OverRiding a method //Makes a duplicate of DefaultLayout //But changes the meaning of the addComponent method //By Andy Harris, 4 / 00 import java.awt.*; import DefaultLayout; public class OverRide extends DefaultLayout{ //still no init method. Rely on the one from Clone //create a new addComponents method, overriding the old one //ours will make labels instead!! public void addComponents(){ add(new Label("One")); add(new Label("Two")); add(new Label("Three")); add(new Label("Four")); add(new Label("Five")); add(new Label("Six")); } // end addComponent } // end class definition