wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes ui manager getColor and link JOptionpane OK button to code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "ui manager getColor and link JOptionpane OK button to code" Watch "ui manager getColor and link JOptionpane OK button to code" New topic
Author

ui manager getColor and link JOptionpane OK button to code

michael wrzos
Greenhorn

Joined: Apr 03, 2011
Posts: 4
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

Joined: Oct 13, 2005
Posts: 37926
    
  22
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: ui manager getColor and link JOptionpane OK button to code
 
Similar Threads
Can't Update Record ?
Simple: Turning A Program Into An Applet
Can't Update Record ?
The INSERT INTO statement contains the following unknown field name: 'OPANo'.
tictactoe help