user3011646
user3011646

Reputation: 3

Best way to show results with a list of options

I am trying to make a "Oregon Trail" like game with JAVA for my Computer Science class. It's all going well so far, but I would like some suggestions on ways of doing the following:

enter image description here

The words at the bottom "Health", "Stats", etc are buttons. I was wondering what the best way of making those buttons present information would be. Is there a way I could show them in that information in one of the bottom squares, and when a different button is clicked change the info to that one? Or would it be best to have popup frames to display the information?

Upvotes: 0

Views: 131

Answers (1)

MadProgrammer
MadProgrammer

Reputation: 347314

IMHO, I'd go with display the content or info of the button in the panels above.

It keeps the information together in a single place and generally makes it easier to manage, no disappearing windows behind other windows for example.

You have any number of options depending on the information you want to display. You could simply use a none editable JTextArea if the information is just text, or a JList if you want to list items if the data is more structured, a JTable and even a JTree if you want to group the data into some kind of groupable hierarchy.

You could use combinations of each, based on your needs

Upvotes: 2

Related Questions