MaxBox instantiation problem

    May 18 2006 | 4:40 pm
    Hi all,
    I'm getting started with trying to dynamically build a patch from a java class, but am having problems getting off the ground.
    I've lifted the following code from the java-docs:
    ---- public void buildRenderEngine(){ MaxPatcher p = new MaxPatcher(50,50,200,200);
    MaxBox maxBox1 = p.newDefault(20,25,"toggle", null);
    p.getWindow().setVisible(true); p.getWindow().setTitle("test patcher"); } ----
    When I call this method, a new patcher window with the correct title is displayed. however, the 'toggle' object does not appear in the new window. I've tried a number of other objects (eg "*~, "cycle~", etc...) but instead of displaying these objects in the new window, the text of the name is displayed in plain text in the window that contains my original mxj object.
    Is this behavior familiar to anyone? Sorry for such a simple question, but I haven't found any relevant threads yet in the forum.