Insubstantial/insubstantial — Issue #64: Too many call on JDesktopPane.paint(..)
Author: Stephane-D
Created: 2012-02-24 16:11:43+00:00
State: open

Since the version 7.2 i observed the DesktopPane is paint when it should not and this cause some severe slowdown in your application. I think it comes from the new rounded border feature (which appear to be actived by default on windows 7).

A simple test is to override JDesktopPane.paintComponent(Graphics g) method to trace paint event.
Then just add a JInternalFrame containing a simple JTextField component :

JInternalFrame j = new JInternalFrame("test", true, true);
j.add(new JTextField());
j.setSize(640, 480);
j.setVisible(true);
desktopPane().add(j, JLayeredPane.DEFAULT_LAYER);

The blinking caret make the complete desktop pane to repaint();
It was not the case in previous version.