JTree not updating after removing node and cant get background to change...
Chris Dancy
Ranch Hand
Joined: Feb 14, 2006
Posts: 136
posted
0
so when I remove a node from the JTree it does repaint how it's suppose to even after a call to repaint. This is what I did..
I've also tried repaint(), updateUI(), revalidate() and nothing seems to work. It removes the node but still half-@$$ draws whats left. however if I remove the jtree and put it back on the screen the nodes are gone that I've removed.
Also another thing I can't figure out is how to change the background of the jtree or simply set it to transparent. setOpaque(false) simply gets me a gray background, and I want no colors at all...just straight through to the background...any ideas?
("Anger is not an emotion, its a symptom of fear.")
Chris Dancy
Ranch Hand
Joined: Feb 14, 2006
Posts: 136
posted
0
Sorry I figured out the problem to my first question... Simply grad the treeModel like so..
And that did it. However I can't seem to find anywhere to change the background of the JTree... Any ideas?
Michael Dunn
Ranch Hand
Joined: Jun 09, 2003
Posts: 4632
posted
0
> how to change the background of the jtree or simply set it to transparent.
set a cellRenderer and use (along with opaque(false))
setBackgroundNonSelectionColor(new Color(0,0,0,0));
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: JTree not updating after removing node and cant get background to change...