The main screen needs to come up, but the login screen(possibly a dialog) c. Recent Topics · Flagged Topics · Hot Topics · Best Topics · Register / Login . you need a CardLayout, which displays the login panel when the program starts. from looking at examples online(since the API from the java site seems to confuse .