setLayout(new CardLayout());Panel one = new Panel();add("first", one);Panel two = new Panel();add("second", two);Panel three = new Panel();add("third", three);show(this, "second");