CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2009
    Posts
    2

    [RESOLVED] Color of button while clicked ?

    First of all, HI.

    I'd doing a Tic-tac-toe game as a side project. The playing area is a 3x3 grid on buttons. I have removed most of the visual eye-candy that buttons have, like borders and painted focus, etc. I would also like to remove the following feature also.

    When you press the button and keep the button pressed, it changes color. I would like it to be white or no enabled at all but I don not know how to do that.

    This is what I mean, http://imgur.com/L8Jgy.png

    Any suggestions ?

  2. #2
    Join Date
    Nov 2009
    Posts
    2

    Re: Color of button while clicked ?

    Ah, I found what I needed.

    <code>UIManager.getDefaults().put("Button.select", Color.white);</code>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured