|
make an actual simple buttons, squares, lines applications there
In general terms you have two approaches:
1 — use components for your chess board, eg a GridLayout of JLabels or JPanels
2 — draw everything on a JPanel in the (overidden) paintComponent method.
Either way you can add your game to the center section of a BorderLayout in your JFrame or JApplet. For controls you have options: JMenus, JToolBar, or a JPanel with JButtons on it which can be added to the south section of the BorderLayout. The tutorial has a section on custom drawing/painting and also a trail on 2D Graphics if you like the drawing alternative. Sounds like you have found the rest of what you'll need there.
|