I am using Windows look and feel.
On a Mac, it is more obvious which button is meant when return is struck:
the tab key causes a light blue outline around the button to move, but the
default button remains completely colored in, which is a much better visual
cue which button is selected.
Windows look and feel is not supported on the Mac, and I haven't yet tried
metal or motif on the Windows box.
If nothing else, it would be nice to have vocabulary that accurately
describes these different states:
Windows:
Default button - The button with bold around it
? - The button whose text has a light colored box around it
Mac:
Default button - The solid blue button
? - the button lightly outlined in blue
Thanks for the suggestion.
Steve
> -----Original Message-----
> From: Elijah Roberts [mailto:eroberts@xxxxxxxxxxxxxxxx]
> Sent: Wednesday, June 11, 2003 10:01 AM
> To: smetter@xxxxxxxxxxxxxxxx; users@xxxxxxxxxx
> Subject: Re: [cinjug-users] JOptionPane
>
>
> I haven't checked recently to see if Sun has changed this, but I believe
> that what you are describing is in reality just the proper behavior for
> the metal look and feel. In metal hitting the enter key always activates
> the default button no matter which button currently has the focus. That
> is simply the way the metal interface functions. If you want Windows
> interface functionality, such as having enter activate whatever button
> currently has focus I think you will have to switch to the windows look
> and feel. I don't know of anyway off hand to change that behavior
> in metal.
>
> If you are using the windows look and feel and are seeing this issue,
> please ignore my above message.
>
> Elijah
>
> Steve Metter wrote:
>
> >I'm using JOptionPane to show a confirmation dialog with the
> >JOptionPane.YES_NO_OPTION, so that the dialog appears with a Yes
> button and
> >a No button. It works just fine when I hit either button with the mouse.
> >
> >I notice that when I hit the tab key, the "highlight" (the outline around
> >the word "Yes") moves from the Yes button to the No button, but the bold
> >outline on the Yes button does not move. This suggests to me that the tab
> >key has not really changed which button is selected (although the visual
> >cues are deceptive).
> >
> >When I hit the return key, the dialog returns as though I had hit the Yes
> >button with the mouse, regardless of which button I have "tabbed" to
> >(regardless of which button has the outline around the button text).
> >
> >I see the same behavior when I use JOptionPane.YES_NO_CANCEL_OPTION.
> >
> >Has anyone else noticed this behavior? Does anyone else find
> this confusing?
> >Is there a simple fix for the behavior in which the button text
> is outlined
> >on the button that is not the currently selected button? Is this a known
> >bug?
> >
> >Thanks,
> >Steve
> >
> >
> >
>
|