SUGGESTED FIX
Name: pzR10082 Date: 10/09/2003
*** /net/crown/export1/zpm/webrev/src/share/classes/com/sun/java/swing/plaf/gtk/GTKFileChooserUI.java- Wed Oct 8 18:43:30 2003
--- GTKFileChooserUI.java Wed Oct 8 18:34:14 2003
***************
*** 716,721 ****
--- 716,734 ----
setText(getFileChooser().getName((File) value));
return this;
}
+
+ public boolean isOpaque() {
+ Color back = getBackground();
+ Component p = getParent();
+ if (p != null) {
+ p = p.getParent();
+ }
+ // p should now be the JList.
+ boolean colorMatch = (back != null) && (p != null) &&
+ back.equals(p.getBackground()) &&
+ p.isOpaque();
+ return !colorMatch && super.isOpaque();
+ }
}
protected class DirectoryCellRenderer extends DefaultListCellRenderer {
***************
*** 726,731 ****
--- 739,757 ----
setText(getFileChooser().getName((File) value) + "/");
return this;
}
+
+ public boolean isOpaque() {
+ Color back = getBackground();
+ Component p = getParent();
+ if (p != null) {
+ p = p.getParent();
+ }
+ // p should now be the JList.
+ boolean colorMatch = (back != null) && (p != null) &&
+ back.equals(p.getBackground()) &&
+ p.isOpaque();
+ return !colorMatch && super.isOpaque();
+ }
}
public Dimension getPreferredSize(JComponent c) {
###@###.###
======================================================================
|