Results 1 to 2 of 2
Like Tree1Likes
  • 1 Post By sunde887

Thread: Help please, new to this

  1. #1
    aclw123 is offline Member
    Join Date
    Oct 2011
    Rep Power

    Default Help please, new to this

    hi i'm trying to change the background color on the start page of a tic tac toe game, but it doesn't seem to be working, here's the section of code.

    i'm using

    Java Code:
    (there's other stuff but this is the only line I think there's a problem with.)

    where start is the JFrame, but it isn't changing the color. I'm more interested in an explanation of how to properly do it that the actual right answer, though either would be helpful

    thanks so much =D

  2. #2
    sunde887's Avatar
    sunde887 is offline Moderator
    Join Date
    Jan 2011
    Richmond, Virginia
    Blog Entries
    Rep Power

    Default Re: Help please, new to this

    I'm hoping you didn't draw directly on the JFrame, instead you should be drawing on a JPanel, which is added to the JFrame. Just call setBackground(Color c); on the JPanel.
    Solarsonic likes this.

Tags for this Thread

Posting Permissions

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