We are about to switch to a new forum software. Until then we have removed the registration on this forum.
This is for myself. To avoid the next hell of java reflection and processing's private and protected pain.
import processing.awt.*;
import java.awt.Frame;
import java.lang.reflect.Field;
import processing.awt.PSurfaceAWT.SmoothCanvas;
void setup() {
Frame frame = get_frame();
println(frame.getLocation().x);
}
Frame get_frame() {
Frame frame = null;
try {
Field f = ((PSurfaceAWT) surface).getClass().getDeclaredField("frame");
f.setAccessible(true);
frame = (Frame) (f.get(((PSurfaceAWT) surface)));
}
catch(Exception e) {
println(e);
}
return frame;
}