while (workingTitle != null) try { Thread.sleep(20); } catch (InterruptedException e) { e.printStackTrace(); } workingTitle = new Title();
if (workingTitle != null) synchronized (workingTitle){ try { workingTitle.wait(); } catch (InterruptedException e) { e.printStackTrace(); } } workingTitle = new Title();
    protected void lockTitle() {        while (workingTitle != null)            try {                Thread.sleep(20);            } catch (InterruptedException e) {                e.printStackTrace();            }        workingTitle = new Title();    }