f_panel = new Canvas(shell, SWT.DOUBLE_BUFFERED);
gridData = new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1);
f_panel.setLayoutData(gridData);
f_panel.setBackground(display.getSystemColor(SWT.COLOR_WHITE));
JRenderer renderer = JRendererFactory.getDefaultRenderer(f_panel, this);
infoTimer.addTickListener(new TickListener() {
@Override
public void timingSourceTick(TimingSource source, long nanoTime) {
updateBallCount();
}
});
animationTimer.init();
infoTimer.init();
shell.setSize(800, 600);
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
renderer.getTimingSource().dispose();
renderer.shutdown();
animationTimer.dispose();
infoTimer.dispose();
display.dispose();
}