equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
129 * <br style="clear:all"> |
129 * <br style="clear:all"> |
130 * <p> |
130 * <p> |
131 * <b>Parameters:</b><br> |
131 * <b>Parameters:</b><br> |
132 * The parameters to these methods follow consistent patterns: |
132 * The parameters to these methods follow consistent patterns: |
133 * <blockquote> |
133 * <blockquote> |
134 * <dl compact> |
134 * <dl> |
135 * <dt>parentComponent<dd> |
135 * <dt>parentComponent<dd> |
136 * Defines the <code>Component</code> that is to be the parent of this |
136 * Defines the <code>Component</code> that is to be the parent of this |
137 * dialog box. |
137 * dialog box. |
138 * It is used in two ways: the <code>Frame</code> that contains |
138 * It is used in two ways: the <code>Frame</code> that contains |
139 * it is used as the <code>Frame</code> |
139 * it is used as the <code>Frame</code> |
147 * A descriptive message to be placed in the dialog box. |
147 * A descriptive message to be placed in the dialog box. |
148 * In the most common usage, message is just a <code>String</code> or |
148 * In the most common usage, message is just a <code>String</code> or |
149 * <code>String</code> constant. |
149 * <code>String</code> constant. |
150 * However, the type of this parameter is actually <code>Object</code>. Its |
150 * However, the type of this parameter is actually <code>Object</code>. Its |
151 * interpretation depends on its type: |
151 * interpretation depends on its type: |
152 * <dl compact> |
152 * <dl> |
153 * <dt>Object[]<dd>An array of objects is interpreted as a series of |
153 * <dt>Object[]<dd>An array of objects is interpreted as a series of |
154 * messages (one per object) arranged in a vertical stack. |
154 * messages (one per object) arranged in a vertical stack. |
155 * The interpretation is recursive -- each object in the |
155 * The interpretation is recursive -- each object in the |
156 * array is interpreted according to its type. |
156 * array is interpreted according to its type. |
157 * <dt>Component<dd>The <code>Component</code> is displayed in the dialog. |
157 * <dt>Component<dd>The <code>Component</code> is displayed in the dialog. |
185 * that will appear at the bottom of the dialog box. |
185 * that will appear at the bottom of the dialog box. |
186 * The usual value for the options parameter is an array of |
186 * The usual value for the options parameter is an array of |
187 * <code>String</code>s. But |
187 * <code>String</code>s. But |
188 * the parameter type is an array of <code>Objects</code>. |
188 * the parameter type is an array of <code>Objects</code>. |
189 * A button is created for each object depending on its type: |
189 * A button is created for each object depending on its type: |
190 * <dl compact> |
190 * <dl> |
191 * <dt>Component<dd>The component is added to the button row directly. |
191 * <dt>Component<dd>The component is added to the button row directly. |
192 * <dt>Icon<dd>A <code>JButton</code> is created with this as its label. |
192 * <dt>Icon<dd>A <code>JButton</code> is created with this as its label. |
193 * <dt>other<dd>The <code>Object</code> is converted to a string using its |
193 * <dt>other<dd>The <code>Object</code> is converted to a string using its |
194 * <code>toString</code> method and the result is used to |
194 * <code>toString</code> method and the result is used to |
195 * label a <code>JButton</code>. |
195 * label a <code>JButton</code>. |