-
Bug
-
Resolution: Fixed
-
P3
-
6u10, 6u12
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8017382 | 6u65 | Vladislav Karnaukhov | P3 | Closed | Fixed | b01 |
JDK-8002185 | 6u60 | Vladislav Karnaukhov | P3 | Closed | Fixed | b01 |
JDK-2184500 | 5.0-pool | Vladislav Karnaukhov | P3 | Closed | Duplicate |
FULL PRODUCT VERSION :
java version "1.6.0_12"
Java(TM) SE Runtime Environment (build 1.6.0_12-b04)
Java HotSpot(TM) Client VM (build 11.2-b01, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
When a JInternalFrame contains a heavyweight component and the internal frame is positioned such that the heavyweight component is not completely displayed the component is not redrawn properly when it becomes visible again. It only refreshes when the internal frame is moved or resized.
This was working up through 1.6.0_11
It is not working in 1.6.0_12, 1.6.0_13, 1.6.0_14-ea-b04
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Put a heavyweight component inside a JInternalFrame
Put the internal frame inside a JDesktopPane
Put the desktop pane inside a heavyweight panel (keeps hw component from showing outside the desktop)
Move the internal frame so that the heavyweight component is half way off the desktop
Resize the desktop so the entire internal frame is visible.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The heavyweight component is redrawn properly as it becomes visible.
ACTUAL -
The part of the heavyweight component that was not displayed is not redrawn until the frame is moved or resized.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
Panel hwPanel = new Panel(new GridBagLayout());
gbc = new GridBagConstraints();
gbc.gridx = 0;
gbc.gridy = 1;
gbc.weightx = 1;
gbc.weighty = 1;
gbc.fill = GridBagConstraints.BOTH;
gbc.gridwidth = GridBagConstraints.REMAINDER;
panel.add(hwPanel, gbc);
JDesktopPane desktop = new JDesktopPane();
gbc = new GridBagConstraints();
gbc.weightx = 1;
gbc.weighty = 1;
gbc.fill = GridBagConstraints.BOTH;
hwPanel.add(desktop, gbc);
iFrame = new JInternalFrame("one", true, true, true, true);
iFrame.setLayout(new GridBagLayout());
iFrame.setPreferredSize(new Dimension(150, 55));
desktop.add(iFrame);
Button button = new Button("HW Button");
gbc = new GridBagConstraints();
gbc.gridx = 0;
gbc.gridy = 1;
iFrame.add(button, gbc);
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
In the test case above setting the frame to not visible and back to visible fixes the problem.
However, I have not found a workaround for the real application.
It has:
-heavy weight canvas in the place of a button
- multiple internal frames
- Desktop Pane is inside a JScrollPane
java version "1.6.0_12"
Java(TM) SE Runtime Environment (build 1.6.0_12-b04)
Java HotSpot(TM) Client VM (build 11.2-b01, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
When a JInternalFrame contains a heavyweight component and the internal frame is positioned such that the heavyweight component is not completely displayed the component is not redrawn properly when it becomes visible again. It only refreshes when the internal frame is moved or resized.
This was working up through 1.6.0_11
It is not working in 1.6.0_12, 1.6.0_13, 1.6.0_14-ea-b04
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Put a heavyweight component inside a JInternalFrame
Put the internal frame inside a JDesktopPane
Put the desktop pane inside a heavyweight panel (keeps hw component from showing outside the desktop)
Move the internal frame so that the heavyweight component is half way off the desktop
Resize the desktop so the entire internal frame is visible.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The heavyweight component is redrawn properly as it becomes visible.
ACTUAL -
The part of the heavyweight component that was not displayed is not redrawn until the frame is moved or resized.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
Panel hwPanel = new Panel(new GridBagLayout());
gbc = new GridBagConstraints();
gbc.gridx = 0;
gbc.gridy = 1;
gbc.weightx = 1;
gbc.weighty = 1;
gbc.fill = GridBagConstraints.BOTH;
gbc.gridwidth = GridBagConstraints.REMAINDER;
panel.add(hwPanel, gbc);
JDesktopPane desktop = new JDesktopPane();
gbc = new GridBagConstraints();
gbc.weightx = 1;
gbc.weighty = 1;
gbc.fill = GridBagConstraints.BOTH;
hwPanel.add(desktop, gbc);
iFrame = new JInternalFrame("one", true, true, true, true);
iFrame.setLayout(new GridBagLayout());
iFrame.setPreferredSize(new Dimension(150, 55));
desktop.add(iFrame);
Button button = new Button("HW Button");
gbc = new GridBagConstraints();
gbc.gridx = 0;
gbc.gridy = 1;
iFrame.add(button, gbc);
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
In the test case above setting the frame to not visible and back to visible fixes the problem.
However, I have not found a workaround for the real application.
It has:
-heavy weight canvas in the place of a button
- multiple internal frames
- Desktop Pane is inside a JScrollPane
- backported by
-
JDK-2184500 JInternalFrame is not redrawing heavyweight children properly
- Closed
-
JDK-8002185 JInternalFrame is not redrawing heavyweight children properly
- Closed
-
JDK-8017382 JInternalFrame is not redrawing heavyweight children properly
- Closed
- duplicates
-
JDK-6899689 HeavyWeight Components are not rendered properly when hidden and shown on lightweight panels
- Closed
- relates to
-
JDK-6768230 HW/LW mixing code slows down resize performance
- Resolved