Results 1 to 3 of 3
Thread: Trying to use the type color
- 02-07-2011, 09:57 AM #1
Member
- Join Date
- Feb 2011
- Posts
- 43
- Rep Power
- 0
Trying to use the type color
I'm trying to get use a method that takes an argument of the typ Color. The method is used to set/change color of an object.
Method
Java Code:public void setColor(Color color) { this.setBodyColor(color); }
Trying to use it
Java Code:test.setColor(red);
How do I set the color to red if I have these colors?
Java Code:private static Color[] colorArray = { Color.green, Color.cyan, new Color(255,0,255), Color.gray, Color.red, Color.black};
- 02-07-2011, 10:08 AM #2
- 02-07-2011, 10:19 AM #3
Member
- Join Date
- Feb 2011
- Posts
- 43
- Rep Power
- 0
Similar Threads
-
Change text color on type
By corbokhan in forum New To JavaReplies: 2Last Post: 11-01-2010, 07:30 PM -
[COLOR="Navy"]execute .bat file in mysql [/COLOR]
By msankar.ravi in forum NetworkingReplies: 0Last Post: 02-24-2010, 04:27 AM -
Question about Strings and Color type
By Psyclone in forum AWT / SwingReplies: 1Last Post: 02-16-2010, 05:28 PM -
using instanceof to get Object type and parent type?
By xcallmejudasx in forum New To JavaReplies: 2Last Post: 11-06-2008, 06:24 PM -
[SOLVED] Cast string type to int type
By GilaMonster in forum New To JavaReplies: 9Last Post: 09-17-2008, 10:43 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks