This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ui manager getColor and link JOptionpane OK button to code

 
michael wrzos
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Got most of this but having a couple of problems. How to assign color value to Strings "X" and "O" after the count and linking the OK button to code reseting the game. Any suggestions? Michael
 
Campbell Ritchie
Sheriff
Posts: 48652
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't like it. doesn't look like object-oriented programming to me. You ought to have an array of buttons, and you should be adding a listener to each. Your listener can alter the text colour as well as the letter.

Moving to out GUIs forum.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic