@@ -245,25 +245,24 @@ public JFrame(String title) {
245245 * This constructor sets the component's locale property to the value returned
246246 * by <code>JComponent.getDefaultLocale</code>.
247247 *
248- * @param title
249- * the title to be displayed in the frame's border. A
250- * <code>null</code> value is treated as an empty string, "".
251- * @param gc
252- * the <code>GraphicsConfiguration</code> that is used to construct
253- * the new <code>JFrame</code> with; if <code>gc</code> is
254- * <code>null</code>, the system default
255- * <code>GraphicsConfiguration</code> is assumed
256- * @exception IllegalArgumentException
257- * if <code>gc</code> is not from a screen device. This exception
258- * is always thrown when GraphicsEnvironment.isHeadless() returns
259- * true.
248+ * @param title the title to be displayed in the frame's border. A
249+ * <code>null</code> value is treated as an empty string, "".
250+ * @param gc the <code>GraphicsConfiguration</code> that is used to construct
251+ * the new <code>JFrame</code> with; if <code>gc</code> is
252+ * <code>null</code>, the system default
253+ * <code>GraphicsConfiguration</code> is assumed
254+ * @exception IllegalArgumentException if <code>gc</code> is not from a screen
255+ * device. This exception is always thrown
256+ * when GraphicsEnvironment.isHeadless()
257+ * returns true.
260258 * @see java.awt.GraphicsEnvironment#isHeadless
261259 * @see JComponent#getDefaultLocale
262260 * @since 1.3
263261 *
264262 */
265263 public JFrame (String title , GraphicsConfiguration gc ) {
266- 秘paintClass = 秘updateClass = /**@j2sNative C$ || */ null ;
264+ 秘paintClass = 秘updateClass = /** @j2sNative C$ || */
265+ null ;
267266 initTitleGC (title , gc );
268267 enableEvents (AWTEvent .KEY_EVENT_MASK | AWTEvent .WINDOW_EVENT_MASK );
269268 setLocale (JComponent .getDefaultLocale ());
@@ -272,17 +271,15 @@ public JFrame(String title, GraphicsConfiguration gc) {
272271 setBackground (UIManager .getColor ("control" ));
273272 setRootPaneCheckingEnabled (true );
274273 if (JFrame .isDefaultLookAndFeelDecorated ()) {
275- boolean supportsWindowDecorations = UIManager .getLookAndFeel ()
276- .getSupportsWindowDecorations ();
274+ boolean supportsWindowDecorations = UIManager .getLookAndFeel ().getSupportsWindowDecorations ();
277275 if (supportsWindowDecorations ) {
278276 setUndecorated (true );
279277 getRootPane ().setWindowDecorationStyle (JRootPane .FRAME );
280278 }
281279 }
282- updateUI ();
283- addNotify (); // BH added; applet will not do this automatically
284- rootPane .addNotify (); // builds a peer for the root pane
285- }
280+ updateUI ();
281+ 秘frameAddNodify (rootPane );
282+ }
286283
287284 public JFrame (Object object , Object object2 , Object object3 , Object object4 ) {
288285 // For SwingJS JInternalFrame constructor
0 commit comments