Results 1 to 3 of 3
- 04-16-2011, 10:11 AM #1
Member
- Join Date
- Apr 2011
- Posts
- 1
- Rep Power
- 0
How to set background color in User Interface?
I'm making a name printer thing and this is the code I've been given for the method:
public void drawNameTag(){
String name = UI.askString("What name do you want on your tag?");
UI.clearGraphics(); // clears the graphics pane
UI.drawOval(200, 100, 200, 150); // draws the outline of a rectangle
UI.drawString("Hi I'm", 120, 135); // puts the string near the top
UI.drawString(name, 150, 180); // puts the name near the center
How do I set the background color in the Oval?
It must be something like:
UI.setBackgroundColor(Color.blue) :confused:
I've tried variations of that and it doesn't work
:(
- 04-16-2011, 10:24 AM #2
- Join Date
- Jan 2011
- Location
- Richmond, Virginia
- Posts
- 3,069
- Blog Entries
- 3
- Rep Power
- 7
What is UI?
I'd also like to point out that there is a drawRect method you can use instead of drawing an oval.
- 04-16-2011, 05:42 PM #3
Member
- Join Date
- Feb 2011
- Posts
- 64
- Rep Power
- 0
Similar Threads
-
Change BufferedImage background color
By Nosrettap in forum New To JavaReplies: 0Last Post: 03-20-2011, 11:29 PM -
Changing background color
By nikkka in forum New To JavaReplies: 4Last Post: 03-12-2011, 05:54 AM -
Background color of window
By Annie George in forum NetBeansReplies: 1Last Post: 09-18-2010, 09:52 AM -
background color with jpanel
By hannerz06 in forum New To JavaReplies: 6Last Post: 03-31-2010, 03:25 AM -
window background color?
By javan00b in forum New To JavaReplies: 3Last Post: 01-29-2008, 10:43 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks