Hi,
If others methods cannot change that value, I would have say that it's would
be a non academic but working way, but since you said that this flag must be
changed by somewhere else, you mustn't use that and set up a boolean flag,
Unless what you can have some debugging troubles because of some strange
behaviours of your app.
It is not related, but if however you albsolutely want to use this kind of
method , an idea is to make a function that the job will be to change this
value, and call this function everytime when you need to change the cursor
value. So, it will be easy to debug is there is only one entry point. Maybe
a parameter passed to the function can be an id of the caller to know easyly
which part of your code has launched the appeal that change the value. Well,
forget that now.
D.
> Presently, on mousePressed on a component, I set the Cursor to
> MOVE_CURSOR. In another unrelated method, I check whether the Cursor is
> MOVE_CURSOR before processing something. Is it okay to do that way taking
> into account that other methods might chance the cursor in different
> threads or should i use a boolean flag?