setSize(world.getWidth(), world.getHeight());
addMouseListener(new MouseAdapter() {
@Override
public void mousePressed(MouseEvent event) {
world.dispatchEvent(new SheepEvent(SheepEvent.START_APPEND_SHEEP));
}
@Override
public void mouseReleased(MouseEvent event) {
world.dispatchEvent(new SheepEvent(SheepEvent.STOP_APPEND_SHEEP));
}
});
ExecutorService executor = Executors.newSingleThreadScheduledExecutor();
executor.execute(this);