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
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
try the inner class concept
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thnx kainhart!
Just what I was looking for.
Thnx again. :p
Just what I was looking for.
Thnx again. :p