Regarding Multiple Tab-Class

Posted by Christine on Stack Overflow See other posts from Stack Overflow or by Christine
Published on 2010-05-11T02:51:28Z Indexed on 2010/05/11 2:54 UTC
Read the original article Hit count: 392

Filed under:

Hi!

I've problem regarding GUI with one Menu and one Order Class.

I've created a variable to store how many items have been selected in the Menu Class.

private int totalSelected;

The var totalSelected is live updated. It can be changed anytime depending on actionPerformed() function.(Exp: totalSelected will add up all the selected items)

In the Order Class, how can I access to the live update variable totalSelected in order to retrieve the live update value? When I invoke getTotalSelected() function inside the Menu Class, I will only obtain a 0 value.

Thanks for your help ^^!

© Stack Overflow or respective owner

Related posts about java