package ui.model; public class IdCounter { private static int counter = 0; public static synchronized int nextId() { return ++counter; } }