Link to home
Start Free TrialLog in
Avatar of GWeeK
GWeeK

asked on

Separating code

Hello
I want to separate my code handling my JFrame+components from the code handling all the events for the application+"underlying" code. So if a button in the mainwindow is pressed all the event handling is processed in another .class file, in order to make the code more easy to overlook.
I.e., can I create an ActionListener in a 2nd class-file and then add that listener to the button i the 1st main class-file?...calling the listener from a component in another class?

Thanks in advance
/ gweek



Avatar of umargul
umargul

try the inner class concept
ASKER CERTIFIED SOLUTION
Avatar of kainhart
kainhart

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of GWeeK

ASKER

Thnx kainhart!
Just what I was looking for.
Thnx again. :p