United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-4483258 Documented exceptions thrown for JWindow are wrong
JDK-4483258 : Documented exceptions thrown for JWindow are wrong

Details
Type:
Bug
Submit Date:
2001-07-24
Status:
Resolved
Updated Date:
2001-08-08
Project Name:
JDK
Resolved Date:
2001-08-08
Component:
client-libs
OS:
solaris_7
Sub-Component:
javax.swing
CPU:
sparc
Priority:
P3
Resolution:
Fixed
Affected Versions:
1.4.0
Fixed Versions:
1.4.0 (beta2)

Related Reports

Sub Tasks

Description
The following JWindow constructors are wrong, they should indicate HeadlessException is thrown in headless mode:

    public JWindow(GraphicsConfiguration gc) {

    public JWindow(Window owner, GraphicsConfiguration gc) {

                                    

Comments
EVALUATION

Yes, these should be changed, here is the new javadoc:

    /**
     * Creates a window with the specified owner window and
     * <code>GraphicsConfiguration</code> of a screen device. If
     * <code>owner</code> is <code>null</code>, the shared owner will be used
     * and this window will not be focusable.
     * 
     * @param owner the window from which the window is displayed
     * @param gc the <code>GraphicsConfiguration</code> that is used
     * 		to construct the new window with; if gc is <code>null</code>,
     * 		the system default <code>GraphicsConfiguration</code>
     *		is assumed, unless <code>owner</code> is also null, in which
     *          case the <code>GraphicsConfiguration</code> from the
     *          shared owner frame will be used.
     * @throws HeadlessException if
     *         <code>GraphicsEnvironment.isHeadless()</code> returns true.
     * @throws IllegalArgumentException if <code>gc</code> is not from
     * 	       a screen device.
     *
     * @see java.awt.GraphicsEnvironment#isHeadless
     * @see #isFocusableWindow
     *
     * @since  1.3
     */
    public JWindow(Window owner, GraphicsConfiguration gc) {

    /**
     * Creates a window with the specified <code>GraphicsConfiguration</code>
     * of a screen device. This window will not be focusable.
     * 
     * @param gc the <code>GraphicsConfiguration</code> that is used
     * 		to construct the new window with; if gc is <code>null</code>,
     * 		the system default <code>GraphicsConfiguration</code>
     *		is assumed
     * @throws HeadlessException If
     *         <code>GraphicsEnvironment.isHeadless()</code> returns true.
     * @throws IllegalArgumentException if <code>gc</code> is not from
     * 	       a screen device.
     *
     * @see java.awt.GraphicsEnvironment#isHeadless
     * @see #isFocusableWindow
     *
     * @since  1.3
     */
    public JWindow(GraphicsConfiguration gc) {

scott.violet@eng 2001-07-23
                                     
2001-07-23
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
merlin-beta2

FIXED IN:
merlin-beta2

INTEGRATED IN:
merlin-beta2


                                     
2004-06-14



Hardware and Software, Engineered to Work Together