This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of Testing JavaScript Applications and have Lucas da Costa on-line!
See this thread for details.
Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

TicTacToe in Java

 
Ranch Hand
Posts: 97
C++ Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ?
See:





I'm on way sure ?
Good bye!
 
Bartender
Posts: 11445
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Use ImageIcon for O/X


Or just a large font and "O" / "X"
 
Gustavo Siqueira
Ranch Hand
Posts: 97
C++ Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you by suggestions!
 
rubbery bacon. crispy tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic