-
Bug
-
Resolution: Fixed
-
P4
-
1.2.0
-
1.2.2
-
x86
-
windows_nt
Name: dbT83986 Date: 01/10/99
Placing a transparent control in a JSplitPane causes severe painting
problems. Its probably because the JSpiltPane does not appear to
clear its own background properly. Try the following test case...
// Foo.java
import java.awt.*;
import javax.swing.*;
public class Foo extends JFrame {
public static void main(String[] args) {
(new Foo()).show();
}
private Foo() {
super("Painting Test");
JLabel left = new JLabel("Left Component");
JLabel right = new JLabel("Right Component");
//left.setOpaque(true); // default is false
//right.setOpaque(true);
// VERTICAL_SPLIT has the same results
JSplitPane split = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, left, right);
setContentPane(split);
setSize(400,300);
}
}
1 - Compile and run the above program.
2 - Drag the splitter side-to-side. Notice the painting problems.
3 - Un-comment the setOpaque(true) lines. Recompile.
4 - Run the program and perform the same tests. Notice that the
problem is gone.
(Review ID: 52344)
======================================================================
- relates to
-
JDK-7190543 Nimbus LaF: regression: JSplitPane is not opaque -- or should it?
-
- Closed
-