I have the following: Frame application which contains: SplitPanel JPanel HeaderPanel JPanel ButtonPanel JPanel SplitPanel JPanel contains: TextPanel JPanel TreePanel JPanel TextPanel JPanel contains: OperationPanel JPanel infoPanel JPanel On a tree event, how do I refresh infoPanel, to display new information. I use a constructor that takes a parameter like: OperationPanel(treeEvent) and the information is correctly send to my Operational JPanel. But, it does not want to refresh. I tried UpdateUI() AND repaint. Nothing works. Please, somoene help?
Joined: May 31, 2001
You could try setting the panel to visible(false)and back to visible(true). I had a weird refresh bug that was fixed that way. Julia
Joined: May 30, 2001
Hi, I had similar problems and I found that altering the size of a component by 1 pixel and then resetting it worked. But I didn't like that so I investigated and found a class called RepaintManager. Once you get the RepaintManager for your component you have a method markCompletelyDirty( JComponent c ) Using this you label the component for a complete repaint once the events currently being handled are dealt with. This was quick enough for my application but if you try to do it in the middle of a long operation it will have to wait until the operation is completed. Hope that helps,
Raising Flares debut album 'Ignition' out now
Terry Doyle <br />SCPJ 1.4 , SCWCD , SCMAD(Beta)
Joined: Feb 12, 2002
I used to have similar problems and seemed like resizing was fixing it. I later found out that it wasn't resizing but it was the underlying validate() or pack() code taht was fixing the issue. I was adding Checboxes dynamically to a panel and was having such an issue.