This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes TicTacToe in Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "TicTacToe in Java" Watch "TicTacToe in Java" New topic

TicTacToe in Java

Gustavo Siqueira
Ranch Hand

Joined: Jun 15, 2011
Posts: 97

Hello all!
I'm creating one game simple in Java!
One Tic Tac Toe.
Desire know how to create the "O" and "X"

Please, give ideas ?

I'm on way sure ?
Good bye!
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10733

Gustavo Hackum wrote:
Desire know how to create the "O" and "X"

Use JLabel or JButton with O/X
Use ImageIcon for O/X (You can combine the icons with the label/button)

If my memory serves me right the JDK used to come bundled with some demo applications/applets, and one of them was tic tac toe. You might want to check that. It should be somewhere under JDK_HOME/samples or JDK_HOME/examples or something similar.

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Darryl Burke

Joined: May 03, 2008
Posts: 4950

Use ImageIcon for O/X

Or just a large font and "O" / "X"

luck, db
There are no new questions, but there may be new answers.
Gustavo Siqueira
Ranch Hand

Joined: Jun 15, 2011
Posts: 97

Thank you by suggestions!
I agree. Here's the link:
subject: TicTacToe in Java
jQuery in Action, 3rd edition