Hi Vitaliy,

This is not a Bug. The behaviour is consistent with JOptionPane of Swing.

setInitialValue("Cancel") will make the Cancel button the default button.

The default command button is the button that the application activates when
users press Enter (or Return). JFC gives the default command button a
heavier border than other command buttons. The default button does not need
to have keyboard focus when users press Enter.

So if you press Enter key, Cancel button will be clicked even though the
focus is on the Ok button.

Thanks and regards,

Janak


>-----Original Message-----
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED] Behalf Of Vitaliy
>Tkachenko
>Sent: Wednesday, February 07, 2007 3:00 PM
>To: [EMAIL PROTECTED]
>Cc: [EMAIL PROTECTED] Com; Janak Mulani
>Subject: [ULC-developer] Bug found: ULCAlert.setInitialValue doesn't
>work
>
>
>Hi, ladies and gentlemen!
>
>       Component:              ULCBase, core
>
>       Version:                6.1.1
>
>       Bug description:
>====================
>ULCAlert dialog = new ULCAlert((ULCRootPane)null, "Test title", "Test
>message", null);
>dialog.setFirstButtonLabel("Ok");
>dialog.setSecondButtonLabel("Cancel");
>dialog.setInitialValue("Cancel");
>dialog.show();
>====================
>This code results in the "Ok" button focused by default.
>
>       Environment:
>Windows XP
>
>
>~~~~~~~~~~~~~~~~~~~~~~
>Vitaliy Tkachenko
>Senior Software Engineer
>Mirasoft
>
>E-mail: [EMAIL PROTECTED]
>Work phone: +380 44 4929960
>Cellular phone: +380 66 7406009
>ICQ: 40299155
>Skype: virtualvat
>
>
>-----Original Message-----
>From: Janak Mulani [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, February 07, 2007 3:02 PM
>To: Vitaliy Tkachenko
>Cc: [EMAIL PROTECTED] Com
>Subject: Your issues
>
>Hi Vitaly,
>
>Please post your issues on the developer list. We can create JIRA issues
>after proper analysis because some of the issues may be non issues or
>duplicates.
>
>Thanks and regards,
>
>Janak
>
>_______________________________________________
>ULC-developer mailing list
>[email protected]
>http://lists.canoo.com/mailman/listinfo/ulc-developer

_______________________________________________
ULC-developer mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/ulc-developer

Reply via email to