Good morning i have to ask something . I have a class extending JFrame . withing the class lets say Main ,i have a button which has a mouselistener and does some things . Now i have to make a separate class for this button which extends JButton but i have to use in it many variables and methods that my main class has . How i do that?? i tried to make a constructor in the class button but i have to insert many arguments , i tried to extend button but it can extend only JButton.
↧