< prev index next >

src/java.desktop/windows/classes/sun/awt/windows/WWindowPeer.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 175,190 **** void initialize() { super.initialize(); updateInsets(insets_); ! Font f = ((Window)target).getFont(); ! if (f == null) { ! f = defaultFont; ! ((Window)target).setFont(f); ! setFont(f); } // Express our interest in display changes GraphicsConfiguration gc = getGraphicsConfiguration(); ((Win32GraphicsDevice)gc.getDevice()).addDisplayChangedListener(this); initActiveWindowsTracking((Window)target); --- 175,195 ---- void initialize() { super.initialize(); updateInsets(insets_); ! if (!((Window) target).isFontSet()) { ! ((Window) target).setFont(defaultFont); ! setFont(defaultFont); } + if (!((Window) target).isForegroundSet()) { + ((Window) target).setForeground(SystemColor.windowText); + } + if (!((Window) target).isBackgroundSet()) { + ((Window) target).setBackground(SystemColor.window); + } + // Express our interest in display changes GraphicsConfiguration gc = getGraphicsConfiguration(); ((Win32GraphicsDevice)gc.getDevice()).addDisplayChangedListener(this); initActiveWindowsTracking((Window)target);
< prev index next >