Re: JPanel help!# Java - 爪哇娇娃
o*d
1 楼
1 Create the frame
2 create the Panel
3 create the button
4 create an instance of listener class which implements the
ActionLister interface.
5 register the listener object to the button
6 add button to the panel
7 add the panel to the frame.
8 Make the frame show on the screen
Actually, if you have a Swing book, open the chaper of
"Event", it will have at least one sample code which is
similar to the problem you are trying to deal with.
2 create the Panel
3 create the button
4 create an instance of listener class which implements the
ActionLister interface.
5 register the listener object to the button
6 add button to the panel
7 add the panel to the frame.
8 Make the frame show on the screen
Actually, if you have a Swing book, open the chaper of
"Event", it will have at least one sample code which is
similar to the problem you are trying to deal with.