< prev index next >

src/windows/classes/sun/awt/windows/WCanvasPeer.java

Print this page
rev 1556 : 6794764: Translucent windows are completely repainted on every paint event, on Windows
6719382: Printing of AWT components on windows is not working
6726866: Repainting artifacts when resizing or dragging JInternalFrames in non-opaque toplevel
6683775: Painting artifacts is seen when panel is made setOpaque(false) for a translucent window
Reviewed-by: anthony, tdv, alexp

*** 108,136 **** g.setColor(((Component)target).getForeground()); } super.paint(g); } - public void print(Graphics g) { - if (!(target instanceof Window) || - AWTAccessor.getWindowAccessor().isOpaque((Window)target)) - { - Dimension d = ((Component)target).getSize(); - if (g instanceof Graphics2D || - g instanceof sun.awt.Graphics2Delegate) { - // background color is setup correctly, so just use clearRect - g.clearRect(0, 0, d.width, d.height); - } else { - // emulate clearRect - g.setColor(((Component)target).getBackground()); - g.fillRect(0, 0, d.width, d.height); - g.setColor(((Component)target).getForeground()); - } - } - super.print(g); - } - public boolean shouldClearRectBeforePaint() { return eraseBackground; } /* --- 108,117 ----
< prev index next >