What I am trying to do is create a viewer in the background I.e a
standard
moveable zoomable layer and have a "hud" which does not move which
contains
a tree.

The code I have tried just now based upon what you have suggested is
the
following:

PLayer pl = new PLayer();
final JScrollPane jsp = new JScrollPane();
jsp.setViewportView(new JTree());
jsp.setPreferredSize(new Dimension(190, 190));
final PSwing ps = new PSwing(jsp);
pl.addChild(ps);
pl.setVisible(false);
picPanel.getCamera().addChild(pl);
return pl;

What I do is create the layer and add it to the camera as a child
so that it is a "sticky" layer. I set the layer to be visible when a
tollbar
button is pressed. All I get is the outline for the scrollpane with no
tree
inside. I have tried adding it directly as a node instead of a layer
to the camera with the same result.

Even when I add the following:
sp.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
jsp.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
I do not get scroll bars!!!

When I add the same code to a layer which is not a sticky layer ie is
zoomable the tree appears. when I zoom out it just goes to an outline
but
when I zoom in I then get the mutliple repaints. I am doing all this
in a class that extends PSwingCanvas. I am not doing any special
painting.
I have tried adapting the pswingexample2 so that it adds the same
thing as a
sticky but I get exactly the same result. I guess it is just not
possible to
have a swing tree as a sticky - which is a real shame. I had posted
this on the users group... but i guess I am either missing something
really obvious or it is a bug. Can anyone point me in the right
direction? either for what I am not doing right or bug fixing/
workaround fixing??

-- 
Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en

Reply via email to