Im working on a turn based strategy game. When a unit is selected on the field I need its available actions to be displayed. Im trying to use JButtons to display the actions so if you were to click the "Move" button you would be enabled to select a destination for that unit. The code I have currently refuses to display and JButtons. I hope you guys can help me out.
Here are a few points that might help you help me:
In the Games constructor it creates a JFrame and JPanel
it sets the JPanel equal to the frames content pane.
The game creates a level.
In the levels "setUp" method it is creating a JButton and passing it to the Games "addComponent" method where it is adding the component to the content pane. (this in itself seems like it may be a little messy to me).
The code compiles and runs fine but I get no JButton.
Thank You!
Here are a few points that might help you help me:
In the Games constructor it creates a JFrame and JPanel
it sets the JPanel equal to the frames content pane.
The game creates a level.
In the levels "setUp" method it is creating a JButton and passing it to the Games "addComponent" method where it is adding the component to the content pane. (this in itself seems like it may be a little messy to me).
The code compiles and runs fine but I get no JButton.
Thank You!