JDK-6328613 : Rendering of large JTabbedPane with non TOP Tab-Placement is too slow on XP
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 5.0
  • Priority: P4
  • Status: Closed
  • Resolution: Cannot Reproduce
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2005-09-26
  • Updated: 2024-07-19
  • Resolved: 2024-07-19
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdResolved
Related Reports
Relates :  
Description
FULL PRODUCT VERSION :
java version "1.5.0_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
Java HotSpot(TM) Client VM (build 1.5.0_04-b05, mixed mode, sharing)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]

A DESCRIPTION OF THE PROBLEM :
When using a large JTabbedPane (JTabbedPane > 1024*768) with Tab Placement != TOP, all repaint operations that include that Tabbedpane are much slower. This occurs only in Java 1.5 on Windows XP.
The cause of it is, that the WindowsXP L&F paints a large image in the contentarea. I have tracked the problem down with OptimizeIt 6.0. It shows that the time is wasted in the constructor of java.awt.image.DataBufferInt which allocates a large int[].

  Bug #6264806 describes a similar problem (may have the same cause), but the evaluation seems to be not applicable for this one, because setting the content to be opaque does not help at all. As of this the priority of that bug should maybe be changed to a higher value again.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
- Open SwingSet of Java 1.5 on a Windows XP.
- Change Look&Feel to Windows XP L&F.
- Make the Window Full Screen (high resolution >1025*768)
- Switch to the TabbedPane Demo Tab
- Switch between the Tabs --> the tabs change instantaneous, no delay, ok
- Now Change the Tab-Placement to "BOTTOM"
- Again Switch between the Tabs --> You will notice a delay between 0.5 and 1 second until the Tabs changes.

ACTUAL -
The behaviour causes our Application to respond very slowly on various selection changes which affect the hole GUI.

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
See SwingSet2...
---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
We now provide a specific WindowsTabbedPaneUI subclass that overrides WindowsTabbedPaneUI .paintContentBorder(Graphics g, int tabPlacement, int selectedIndex) with the default code copied from BasicTabbedPaneUI for all TabbedPanes that use non top Tab Placements.
The Workaround of Bug #6264806 does not help.

Comments
Not reproducible in windows11 with latest jdk24 repo...
19-07-2024

EVALUATION Need to investigate why covering the image with an opaque panel still causes the image to be painted.
29-09-2005