Index: javax/swing/plaf/basic/BasicTreeUI.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicTreeUI.java,v retrieving revision 1.105 diff -u -r1.105 BasicTreeUI.java --- javax/swing/plaf/basic/BasicTreeUI.java 30 Oct 2005 23:15:11 -0000 1.105 +++ javax/swing/plaf/basic/BasicTreeUI.java 3 Nov 2005 21:56:11 -0000 @@ -2259,9 +2259,12 @@ boolean inBounds = bounds.contains(click.x, click.y); if ((inBounds || cntlClick) && tree.isVisible(path)) { - selectPath(tree, path); - if (inBounds && e.getClickCount() == 2 && !isLeaf(row)) - toggleExpandState(path); + if (inBounds) + { + selectPath(tree, path); + if (e.getClickCount() == 2 && !isLeaf(row)) + toggleExpandState(path); + } if (cntlClick) { @@ -3162,9 +3165,9 @@ y0 += halfHeight; } - int max = mod.getChildCount(curr); if (isExpanded) { + int max = mod.getChildCount(curr); for (int i = 0; i < max; i++) { int indent = indentation + rightChildIndent; @@ -3739,8 +3742,10 @@ if (tree.isVisible(path)) { - bounds.width = preferredSize.width; + if (!validCachedPreferredSize) + updateCachedPreferredSize(); bounds.x += gap; + bounds.width = preferredSize.width + bounds.x; if (editingComponent != null && editingPath != null && isEditing(tree) && node.equals(editingPath.getLastPathComponent())) @@ -3818,9 +3823,13 @@ else current = current.pathByAddingChild(next); do - next = getNextNode(next); - while (next != null && - !tree.isVisible(new TreePath(getPathToRoot(next, 0)))); + { + TreePath path = new TreePath(getPathToRoot(next, 0)); + if (tree.isVisible(path) && tree.isExpanded(path)) + next = getNextNode(next); + else next = getNextSibling(next); + } + while (next != null && !tree.isVisible(new TreePath(getPathToRoot(next, 0)))); } currentVisiblePath = current; tree.setVisibleRowCount(getRowCount(tree)); Index: javax/swing/table/DefaultTableCellRenderer.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/table/DefaultTableCellRenderer.java,v retrieving revision 1.18 diff -u -r1.18 DefaultTableCellRenderer.java --- javax/swing/table/DefaultTableCellRenderer.java 3 Nov 2005 20:27:47 -0000 1.18 +++ javax/swing/table/DefaultTableCellRenderer.java 3 Nov 2005 21:56:11 -0000 @@ -50,6 +50,7 @@ import javax.swing.border.Border; import javax.swing.border.EmptyBorder; import javax.swing.JTextField; +import javax.swing.plaf.ColorUIResource; /** * Class to display every cells. @@ -149,13 +150,14 @@ setForeground(table.getForeground()); } - if (hasFocus) - { - setBackground(getBackground()); - setBorder(UIManager.getBorder("Table.focusCellHighlightBorder")); - } - else - setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1)); + if (hasFocus) + { + if (!(getBackground() instanceof ColorUIResource)) + setBackground(table.getBackground()); + setBorder(UIManager.getBorder("Table.focusCellHighlightBorder")); + } + else + setBorder(BorderFactory.createEmptyBorder(1, 1, 1, 1)); setEnabled(table.isEnabled()); setFont(table.getFont());