Reputation: 3866
I am developing a math game and I was thinking about displaying the data like so:
JOptionPane.showConfirmDialog()
) if they would like to see a graphical representation of their progress. JMenuBar
with only one JMenu
with two JMenuItem
s (an option for both of the two modes).I know that multiple JFrames can be bad practice, and I was thinking about using JSplitPane
s, but then it might get too crowded (and I wouldn't be able to let the users choose the mode!). Would a JDialog
be recommended, or would you recommend something else? //I apologize if it sounds like I am asking you all to do some of my thinking for me...
Upvotes: 1
Views: 50
Reputation: 168825
Seems best suited to a CardLayout
with a single control to select between cards (e.g. a JList
or JComboBox
, JSpinner
, menus etc.).
E.G. as seen in this short example, that uses radio buttons in a button group to select the card.
Upvotes: 1
Reputation: 3866
I might have a potential solution: make the JMenuBar
universal! That would eliminate the need for two JTabbedPane
s and thus speed up performance (due to less Objects
floating around, especially expensive GUI Objects)!
Upvotes: 0