Canvas on JFrame?

I followed the tutorial for using swing with JMonkey and got the example working however I’m having trouble getting it to work with my JFrame I created using the Netbeans GUI. I’m not very familiar with swing so perhaps I’m missing something simple. I appreciate any help.

public static void main(String[] args) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {

      AppSettings settings = new AppSettings(true);
      settings.setWidth(640);
      settings.setHeight(480);

    Main canvasApplication = new Main();
    canvasApplication.setSettings(settings);
    canvasApplication.createCanvas(); // create canvas!
    JmeCanvasContext ctx = (JmeCanvasContext) canvasApplication.getContext();
    ctx.setSystemListener(canvasApplication);
    Dimension dim = new Dimension(640, 480);
    ctx.getCanvas().setPreferredSize(dim);
    
    JFrame window = new FrameWorldEdit();

    window.add(ctx.getCanvas());
    window.pack();
    window.setVisible(true);
    canvasApplication.startCanvas();

  }
});

}

This produces my JFrame , which has zero components for testing , and no canvas.

Have you compared with the example for this? somewhere in the example packages.

I looked through and didn’t see this particular example in the test.

There are examples on github.

Those all deal with manually creating Frames and adding a Canvas. I can do that. My issues is adding a Canvas to a Frame designed with the GUI builder.