Results 1 to 5 of 5
  1. #1
    Joey is offline Member
    Join Date
    May 2010
    Posts
    3
    Rep Power
    0

    Default 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.

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,516
    Rep Power
    25

    Default

    1) If nothing is displayed (ie no GUI) how would you display a color?
    4) You don't call variables.

  3. #3
    Joey is offline Member
    Join Date
    May 2010
    Posts
    3
    Rep Power
    0

    Default

    Thankyou for your reply!

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,036
    Rep Power
    20

    Default

    For number 2, you don't have to import anything to actually use it...so long as you use the full classname (including package).

  5. #5
    Joey is offline Member
    Join Date
    May 2010
    Posts
    3
    Rep Power
    0

    Default

    Oh! Thanks. You know, I'm going to check out those tutorials in forum. I just noticed that section!

Similar Threads

  1. I want to put the native library in library path in mac os x
    By Hussain Ali in forum Advanced Java
    Replies: 2
    Last Post: 02-24-2010, 07:55 AM
  2. Replies: 3
    Last Post: 09-07-2009, 01:28 PM
  3. How to add jar library in java?
    By anilshelar in forum Advanced Java
    Replies: 10
    Last Post: 09-02-2009, 04:31 AM
  4. Questions On Java GUI Library
    By hitmen in forum AWT / Swing
    Replies: 8
    Last Post: 02-26-2009, 10:50 AM
  5. Tell me jar file for library library org.bouncycastle.cms
    By 82rathi.angara in forum New To Java
    Replies: 10
    Last Post: 09-09-2008, 05:11 AM

Posting Permissions

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