@Override
    public void setTitle(String title) {
        if (title != null) {
            super.setTitle(title);
            titleModified = false;
        } else if (Main.dataModified && !titleModified) {
            super.setTitle("MyMoney - "+Main.database.getName()+"*");
            titleModified = true;
        } else if (!Main.dataModified && titleModified) {
            super.setTitle("MyMoney - "+Main.database.getName());
            titleModified = false;
        }
    }