This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 91670 - Sample Dialogs should use standard constants
Summary: Sample Dialogs should use standard constants
Status: NEW
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-02 12:32 UTC by msayag
Modified: 2008-05-05 15:38 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description msayag 2007-01-02 12:32:53 UTC
The sample "OK/Cancel Dialog" defines the constants RET_CANCEL and RET_OK while
it should use the standard constants of JOptionPane that are defined for the
same purpose JOptionPane.CANCEL_OPTION and JOptionPane.OK_OPTION.

Moreover, the method closeDialog(...) should return JOptionPane.CLOSED_OPTION
instead of RET_CANCEL and so does the default value of "returnStatus".

The use of the constants of JOptionPane is preferred so the users of this class
can use the same code for for both "standard" JOptionPane and the sample dialog:
<code>
if (result == JOptionPane.OK_OPTION) {
    ....
}
</code>
Comment 1 kate 2008-05-05 15:38:15 UTC
no changes so far (6.1)