This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
Why are you creating the Display instance everytime? This has no relation with the Display instance that is actually displayed in the GUI. Like you have mentioned, you should pass the reference of the correct Display instance to the Cancel class and then use it inside the ActionListener...
SCJP 1.4, OCMJEA/SCEA 5.0.
Joined: Mar 27, 2012
I've created new instance in Cancel class, because I've needed to invoke setResult method, which is in Display class. Thank You for indicating this mistake, when I'll be back from work I'll try different approach to pass this arguments. I hope I'll find solution.