This is what iam trying to do. dont worry about my logic here. this is just so i can understand how to extends etc....
**
main.java will call aaaa.java.
aaaa.java will call bbbb.java
bbbb.java will create one button and that button will have a actionlistener.
**
Expand|Select|Wrap|Line Numbers
- public class Main extends JFrame{
- public Main() {
- // TODO Auto-generated constructor stub
- }
- public static void main(String[] args){
- aaaa a = new aaaa(); //??
- }
- }
- public class aaaa extends JFrame{ //???
- public aaaa() {
- bbbb b = new bbbb(); //??
- }
- }
- public class bbbb implements ActionListener{ //????
- JButton b1 = new JButton("check here");
- public bbbb() {
- //??
- }
- public void actionPerformed(ActionEvent e) {
- }
- }