import javax.swing.*; import java.awt.*; import java.awt.event.ActionListener; public class CardLayoutTest { Frame f = new Frame("cardlayout test"); Panel p1 = new Panel(); String[] names = {"上一张","下一张","第一张","…
http://www.careerride.com/Swing-AWT-Interview-Questions.aspx Swing interview questions and answers for freshers and experienced candidates. These interview questions and answers on Swing will help you strengthen your technical skills, prepare for t…
AWT事件处理基本概念 AWT事件处理过程中,主要涉及3类对象: ① Event(事件):用户对组件的一个操作,称之为一个事件,以类的形式出现,例如,键盘操作对应的事件类是KeyEvent.其实例在该事件发生时由系统自动产生.每一种事件都对应专门的监听者. ② Event Source(事件源):事件发生的场所,通常就是各个组件,例如按钮Button. ③ Event Monitor(事件监听器):接收事件对象并对其进行处理的类的对象,通常其中某个成员方法对事件进行相应的处理. 注:…