Name: ks84122 Date: 05/24/2002
Run the attached program. Box.gif is a 32x16 image(attached) (bug does not
happen with 16x16 image). Notice how left part of box.gif is overwritten in
2nd and greater columns. The letter "I" that's painted in red can not be seen
in 2nd and greater columns. This happens in Motif L&F on solaris and windows.
reproducible with JDK 1.4 and 1.4.1 (build 13)
import javax.swing.*;
public class TabBug {
public static void main(String[] args) {
try {
UIManager.setLookAndFeel("com.sun.java.swing.plaf.motif.MotifLookAndFeel");
}
catch (Exception ex) {
}
Icon icon = new ImageIcon(TabBug.class.getResource("box.gif"));
JFrame frame = new JFrame();
JTabbedPane tabs = new JTabbedPane();
tabs.setTabPlacement(JTabbedPane.RIGHT);
for (int i = 0; i < 50; i++) {
tabs.addTab(i + "", icon, new JPanel());
}
frame.getContentPane().add(tabs);
frame.setSize(300, 400);
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
frame.show();
}
}
(Review ID: 146870)
======================================================================