• Post Reply Bookmark Topic Watch Topic
  • New Topic

mouselisteners in a separate class?

 
elwin Ilam
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,

Background story: I'm working on the structure of my application, which contains a GUI class, and a separate class for each of the checklist form that are loaded into the GUI frame.

Now I've got a sh*tload of mouseentered and mouseexited lines in each of the forms.

Where do you reckon placing the mouseover code is best? Currently I'm thinking of just putting them in the GUI class...which makes an instance of each of the forms.
I can't put them in the classes of the forms, can I? Because then I would need to make an instance of the GUI class, which would become an infinite loop. (gui class makes instance of form class, form instance makes instance of gui class etc.)

Or do you think a separate class would be a good idea?

Cheers,
Elwin
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now I've got a sh*tload of mouseentered and mouseexited lines in each of the forms.

Entered and exited? What are you trying to do here? Provide the user some feedback when mouse hovers over a component? If yes the using a tooltip would be an easier way.


 
elwin Ilam
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah sweet, didnt know that was possible.
No worries about inter-class communication.
Thanks mate
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!