L
lltaylor
Hello,
I have written a threaded tree control which is displayed in an
applet.
The way it works is that the reusable control is a canvas.
The control is created in an applet and the canvas is drawn onto a
panel.
Things work great when the content is static, however when the tree
structure
is changed - i.e. someone adds a folder or deletes a file problems
creep in.
I have no problem updating the tree (which is the canvas) but after
every change the new canvas needs to be placed on the panel.
I have tried
Panel.remove(tree);
Panel.add("Center", tree);
(there are three panels in total - the other two have scrollbars in
them)
But this does not appear to update when changes are made.
So I have tried
Panel.removeAll();
Panel.add("Center", tree);
Panel.add("South", horizontalScrollbar);
Panel.add("East", verticalScrollbar);
This does the update perfect however I get a flickerwhen the update
occurs.
So basically my question is in two parts?
Can anyone suggest how I can update the panel to avoid it flickering?
Or anyone suggest an alternative way of organising my tree so it
remains a generic control but has a better method of updating?
does that make sense?
Any suggestion greatfully recieved.
Regards
Lloyd
I have written a threaded tree control which is displayed in an
applet.
The way it works is that the reusable control is a canvas.
The control is created in an applet and the canvas is drawn onto a
panel.
Things work great when the content is static, however when the tree
structure
is changed - i.e. someone adds a folder or deletes a file problems
creep in.
I have no problem updating the tree (which is the canvas) but after
every change the new canvas needs to be placed on the panel.
I have tried
Panel.remove(tree);
Panel.add("Center", tree);
(there are three panels in total - the other two have scrollbars in
them)
But this does not appear to update when changes are made.
So I have tried
Panel.removeAll();
Panel.add("Center", tree);
Panel.add("South", horizontalScrollbar);
Panel.add("East", verticalScrollbar);
This does the update perfect however I get a flickerwhen the update
occurs.
So basically my question is in two parts?
Can anyone suggest how I can update the panel to avoid it flickering?
Or anyone suggest an alternative way of organising my tree so it
remains a generic control but has a better method of updating?
does that make sense?
Any suggestion greatfully recieved.
Regards
Lloyd