I have written a little tool ( and when I say little I mean little ) that just supplies a window with three JButtons on it (Restart X, Reboot, Shutdown). It is just a comfort tool for the maintenance folks here. When you select a button a confirmation box pops up over it with two more JButtons, Yes and No. Click Yes, and you perform the function. Click no and the confirmation box disappears and you go back to what you were doing. No big deal.
But my customer wants me to set things up where the No button is the default button. I have done that. It works....as expected.... I just have one problem. When I set the DefaultButton to the NO button, I get a double line around the button like
you should, the button looks slightly more pronounced like it should, and when I mouse into the window and hit Enter it performs the No function.....again like it should.
So what is my problem?
The button on the left is Yes, and No is on the right. The
word Yes has a light square around it that moves to the No button ONLY when I click the No button. THEY seem to think that the square is indicative of focus and would like to see it come up on the No button. I have not been able to find a call in the API that will move that square. It comes up on the first button no matter what I do.
Is there a way to move that square to another button? It doesnt seem to have anything to do with DefaultButton, or setting the focus, I cant find anything.
Anybody got any ideas?
I'd appreciate a "kick" here...
Bob