This if statement should go inside the JLayout