//edit: HAHA! Typo in the title, can someone fix that?
Ok all, I'm a little stumped at the moment. I'll be honest, I've been drinking a bit, as is my tradition on saturday nights while doing programming homework, but, I think that might have screwed me a bit (no, not really, but I have to blame something).
Yes, this is homework, and yes, I know I'm not supposed to be 'ignorant noooooooob', but, I understand the logic here.
user clicks window
change button status to enabled, or inFocus, or whatever
user clicks off window
change button status to disabled, or outFocus, or whatever
Anyway, the API listings are betraying me this evening. I'm trying to find the best code to do the following:
When the window is out of focus, 2 specific JButtons are greyed out (not even sure on how to do that. I bet its just a simple JButton option, but, I can't freaking find it, and its annoying as hell.)
When the window comes into focus, change those JButtons to enabled (also, not sure how to do this, but, its obviously the opposite of the previous issue.)
There are no recommended methods, or ideas on how to obtain this outcome, so, this is where I'm lost. Should I be using a mouseListener? or maybe a windowInFocus? And what option of a JButton would let me just 'grey it out' as in, visible, but obviously not usable?
Theres some other things in this homework, but its cake. Exception handling stuff, I've got it handled.
<3 you all if I could get some recommendations.
Ok all, I'm a little stumped at the moment. I'll be honest, I've been drinking a bit, as is my tradition on saturday nights while doing programming homework, but, I think that might have screwed me a bit (no, not really, but I have to blame something).
Yes, this is homework, and yes, I know I'm not supposed to be 'ignorant noooooooob', but, I understand the logic here.
user clicks window
change button status to enabled, or inFocus, or whatever
user clicks off window
change button status to disabled, or outFocus, or whatever
Anyway, the API listings are betraying me this evening. I'm trying to find the best code to do the following:
When the window is out of focus, 2 specific JButtons are greyed out (not even sure on how to do that. I bet its just a simple JButton option, but, I can't freaking find it, and its annoying as hell.)
When the window comes into focus, change those JButtons to enabled (also, not sure how to do this, but, its obviously the opposite of the previous issue.)
There are no recommended methods, or ideas on how to obtain this outcome, so, this is where I'm lost. Should I be using a mouseListener? or maybe a windowInFocus? And what option of a JButton would let me just 'grey it out' as in, visible, but obviously not usable?
Theres some other things in this homework, but its cake. Exception handling stuff, I've got it handled.
<3 you all if I could get some recommendations.