this is GoToLoop 's code,how to make it work in P3D ? (JFrame)

        // forum.Processing.org/two/discussion/17270/
        // why-this-getx-method-is-missing-in-processing-3-1-1#Item_5

        // GoToLoop (2016-Jun-24)
      void setup() {
         //size(200,200,P3D);  
          println(getJFrame(getSurface()).getX());
          exit();
        }

        static final javax.swing.JFrame getJFrame(final PSurface surf) {
          return
            (javax.swing.JFrame)
            ((processing.awt.PSurfaceAWT.SmoothCanvas)
            surf.getNative()).getFrame();
        }

I got cast error in P3D mode

Answers

Sign In or Register to comment.