Results 1 to 2 of 2
Thread: Help please, new to this
- 10-02-2011, 01:29 AM #1
Member
- Join Date
- Oct 2011
- Posts
- 1
- Rep Power
- 0
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:start.setBackground(Color.RED);
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
- 10-02-2011, 01:47 AM #2
- Join Date
- Jan 2011
- Location
- Richmond, Virginia
- Posts
- 3,068
- Blog Entries
- 3
- Rep Power
- 15
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.
Bookmarks