void toggleTitle(SimPanel p) {
        int index = tabs.indexOfComponent(p);
        String s = SimPanel.newFile.getName();
        if (p.getFile() != null) {
            s = p.getFile().getName();
        }
        tabs.setTitleAt(index, s + (p.isModified() ? "*" : " "));
    }