src/share/classes/javax/swing/plaf/basic/BasicTreeUI.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -40,10 +40,11 @@
import javax.swing.plaf.UIResource;
import javax.swing.plaf.TreeUI;
import javax.swing.tree.*;
import javax.swing.text.Position;
import javax.swing.plaf.basic.DragRecognitionSupport.BeforeDrag;
+import sun.awt.AWTAccessor;
import sun.swing.SwingUtilities2;
import sun.swing.DefaultLookup;
import sun.swing.UIAction;
@@ -2163,15 +2164,11 @@
tree.add(editingComponent);
editingComponent.setBounds(nodeBounds.x, nodeBounds.y,
nodeBounds.width,
nodeBounds.height);
editingPath = path;
- if (editingComponent instanceof JComponent) {
- ((JComponent)editingComponent).revalidate();
- } else {
- editingComponent.validate();
- }
+ AWTAccessor.getComponentAccessor().revalidateSynchronously(editingComponent);
editingComponent.repaint();
if(cellEditor.shouldSelectCell(event)) {
stopEditingInCompleteEditing = false;
tree.setSelectionRow(row);
stopEditingInCompleteEditing = true;