Hi all

i have done many panels with Canvas 3D on it in a CardLayout, each panel showing 
different projections which i use a PopupMenu to control which panel should be shown. 
Now the problem is i try to only attach the view branchgroup to the locale when that 
panel for it is being shown... but it doent work unless i attach everything first in 
my constructor.... so if i render all the canvases, it is very very slow....

//constructor
public Example()
{
        .......
//actually i dont want to add all the views here coz it slows down everything
                locale.addBranchGraph(view1);
                locale.addBranchGraph(view2);
                locale.addBranchGraph(view3);
                locale.addBranchGraph(view4);
}

//my event catcher for the pressing od the MenuItem
public class PopupActionListener implements ActionListener {
                public void actionPerformed(ActionEvent event) {
                        MenuItem mi = (MenuItem)event.getSource();
                        String s = mi.getLabel();
                        if(s.equals("Viewer Panel")) {
                                        card.show(cardPanel,"menu1");
                        }       else if(s.equals("Color Panel")){
                                        card.show(cardPanel,"menu2");
                        }
                        else if(s.equals("Multiview")){
                                        
cardCanvas.show(cardCanvasPanel,"multiviewCanvas");
                                        Id = 1;


                        // i tried to remove the other panels here but somehow not 
really working....and how would i know which branchgroup to remove....

i tried using the
                                        viewNodes = locale.getAllBranchGraphs();

                                        but somehow.. maybe i didnt know how to 
manipulate it....
                        }       else if(s.equals("Isometric")){

                        }
}

Thanks

any help is appreciated

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to