Results 1 to 5 of 5
- 05-19-2010, 01:30 AM #1
Member
- Join Date
- May 2010
- Posts
- 3
- Rep Power
- 0
The java Library and other questions
Can someone please tell me how to display colors?
"I'm new to the java library and i'm trying my best to learn how to use the different methods and variables.."
Question 1: Do you NEED a GUI to display color? (I've tried to google it but many things pop up that I didn't find very helpful, because there was way to much irrelevant information.)
Question 2: Do you have to import Color to use it? (Such as java.awt.Color; ) ? I think you do but I'd like to get as much feedback as I possibly can because I'm really trying hard to understand how to use the library and all of the features in it.
Question 3: How exactly DO you use the Graphics? The package is java.awt.Graphics; I know that I can't instantiate (I think that's the word) the class because it's abstract so how exactly do I use its methods and variables?
Question 4: Can you call a static variable? I know how to call a static method such as math.random() but is it possible to call a variable too? I'm pretty sure i've tried calling a static variable but I don't think it worked.
Question 5: How would you write something on the inside of a JFrame?
THANKYOU for all of your feedback and I hope you guys can help me out! I've tried all of these things and I'm having trouble understanding them (especially about the library).Last edited by Joey; 05-19-2010 at 02:56 AM.
- 05-19-2010, 01:58 AM #2
1) If nothing is displayed (ie no GUI) how would you display a color?
4) You don't call variables.
- 05-19-2010, 02:47 AM #3
Member
- Join Date
- May 2010
- Posts
- 3
- Rep Power
- 0
Thankyou for your reply!
- 05-19-2010, 09:31 AM #4
Moderator
- Join Date
- Apr 2009
- Posts
- 10,438
- Rep Power
- 16
For number 2, you don't have to import anything to actually use it...so long as you use the full classname (including package).
- 05-19-2010, 06:21 PM #5
Member
- Join Date
- May 2010
- Posts
- 3
- Rep Power
- 0
Similar Threads
-
I want to put the native library in library path in mac os x
By Hussain Ali in forum Advanced JavaReplies: 2Last Post: 02-24-2010, 07:55 AM -
java.lang.UnsatisfiedLinkError: no parport in java.library.path
By Heather in forum NetBeansReplies: 3Last Post: 09-07-2009, 01:28 PM -
How to add jar library in java?
By anilshelar in forum Advanced JavaReplies: 10Last Post: 09-02-2009, 04:31 AM -
Questions On Java GUI Library
By hitmen in forum AWT / SwingReplies: 8Last Post: 02-26-2009, 10:50 AM -
Tell me jar file for library library org.bouncycastle.cms
By 82rathi.angara in forum New To JavaReplies: 10Last Post: 09-09-2008, 05:11 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks