public void createWorld() { world = new World(getSize()); world.addObserver(this); }
@Override public void componentResized(ComponentEvent arg0) { if (world == null) return; world.resize(getSize()); }