9 Years
Discussion Span
Last Post by llemes4011

Yes, use a JTabbedPane. Tutorial here. And you create buttons using the JButton class. If you have to move the buttons around, you might want to look into different Layout Managers, some are better than others as far as giving you control over where things are placed.


Okay, I got the Tabs working, and I got some test options in, and they work fine =)

Also, I'm going to add a few JTextFields to retrieve key data from the user (ie, which key carries out which command). So, would I just add a KeyListener to each of the JTextField and retrieve the key that way? or would it be better to make a JOptionPane that has a message, which is brought by pressing a button and add a KeyListener to the JOptionPane? I think that the JOptionPane is a better idea, but involves a lot more clicking, and I wouldn't have to worry about multiple keys being pressed and the user getting confused....


I don't know very much about KeyListeners, sorry. But I'd do whatever is the most clear to the user (as far as what you're asking them to do) first, and whatever involves the least clicking is secondary.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.