JDK-4483258 : Documented exceptions thrown for JWindow are wrong
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 1.4.0
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_7
  • CPU: sparc
  • Submitted: 2001-07-24
  • Updated: 2001-08-08
  • Resolved: 2001-08-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.4.0 beta2Fixed
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
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: merlin-beta2 FIXED IN: merlin-beta2 INTEGRATED IN: merlin-beta2
14-06-2004

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
23-07-2001