@@ -0,0 +1,588 @@
+package example;%0A%0Aimport java.awt.BorderLayout;%0A%0Aimport javax.swing.JFrame;%0A%0Aimport processing.core.*;%0A%0Apublic class MainJFrame %7B%0A%09static public void main(String args%5B%5D) %7B%0A%09%09// This method works!%0A%09%09//PApplet.main (new String%5B%5D %7B %22--present%22, %22--bgcolor=#000000%22, %22--stop-color=#cccccc%22, %22example.Main%22%7D);%0A%09%09%0A        // But now this method.%0A        JFrame frame = new JFrame ();%0A        frame.setLayout(new BorderLayout());%0A        PApplet sketch = new example.Main();%0A        frame.add(sketch, BorderLayout.CENTER);%0A        sketch.init();%0A        frame.pack();%0A        frame.show();%0A%09%7D%0A%7D%0A

Add MainJFrame to ideExamples. My swing is rusty.