// Maximize.
this.setSize(dim.width - 50, dim.height - 50);
this.setExtendedState(JFrame.MAXIMIZED_BOTH);
// resize listener
LazyCanvasResizer listener = new LazyCanvasResizer(this) {
@Override
public void executeResize(double newratio) {
setRatio(newratio);
}
};
setRatio(listener.getActiveRatio());
this.addComponentListener(listener);
context.addResultListener(this);
update();