I'm working on a game as a practice project. When it's first loaded, the user is prompted to login or create a new player. If the user selects to create a new player, what I want to happen is for the new-player-creation form to be displayed (the main game board is a JDesktopPane
, and ideally, it would be in a JPanel
on the top layer of it), and everything else pause until the user fills out and submits this form.
Since other user input tasks within the game are done with JOptionPane.showInternalOptionDialog
, I figured this might do the job, as I'm looking for a JPanel
that acts like a modal dialog. However, I want something that doesn't have a title bar or close button
, just OK and Cancel buttons. Is there a way to show an internal dialog without these? Or some other way to have a JPanel
act like a modal dialog?