< prev index next >

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

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1996, 2014, 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, 2017, 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
*** 20,33 **** * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package sun.awt.windows; ! import java.awt.*; ! import java.awt.peer.*; import sun.awt.SunGraphicsCallback; class WPanelPeer extends WCanvasPeer implements PanelPeer { --- 20,39 ---- * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ + package sun.awt.windows; ! import java.awt.Color; ! import java.awt.Component; ! import java.awt.Container; ! import java.awt.Graphics; ! import java.awt.Insets; ! import java.awt.SystemColor; ! import java.awt.peer.PanelPeer; import sun.awt.SunGraphicsCallback; class WPanelPeer extends WCanvasPeer implements PanelPeer {
*** 79,95 **** super.initialize(); insets_ = new Insets(0,0,0,0); Color c = ((Component)target).getBackground(); if (c == null) { ! c = WColor.getDefaultColor(WColor.WINDOW_BKGND); ((Component)target).setBackground(c); setBackground(c); } c = ((Component)target).getForeground(); if (c == null) { ! c = WColor.getDefaultColor(WColor.WINDOW_TEXT); ((Component)target).setForeground(c); setForeground(c); } } --- 85,101 ---- super.initialize(); insets_ = new Insets(0,0,0,0); Color c = ((Component)target).getBackground(); if (c == null) { ! c = SystemColor.window; ((Component)target).setBackground(c); setBackground(c); } c = ((Component)target).getForeground(); if (c == null) { ! c = SystemColor.windowText; ((Component)target).setForeground(c); setForeground(c); } }
< prev index next >