Discussion Board

Results 1 to 8 of 8

Thread: help::java.awt

  1. #1
    Registered User bunkdeath's Avatar
    Join Date
    May 2010
    Posts
    17
    Hello every one,
    On my way to java application, I needed to use java.awt package. My java sdk does not contain it so I downloaded it. Now my problem is, how to make it use by import? What I have is just byte codes, and I got no idea how to use it.

    Any help is appreciated.

    Thanks

  2. #2
    Nokia Developer Champion rahulvala's Avatar
    Join Date
    Oct 2008
    Location
    INDIA
    Posts
    2,294
    Quote Originally Posted by bunkdeath View Post
    Hello every one,
    On my way to java application, I needed to use java.awt package. My java sdk does not contain it so I downloaded it. Now my problem is, how to make it use by import? What I have is just byte codes, and I got no idea how to use it.

    Any help is appreciated.

    Thanks
    Using the line :

    Code:
    import java.awt.
    It imports the awt package which contains all the essential tools for drawing using java, including Color class, and the various visual Component Classes.

    Also see this : Packages and Import
    Last edited by rahulvala; 2010-08-30 at 19:14. Reason: CHANGE

  3. #3
    Registered User bunkdeath's Avatar
    Join Date
    May 2010
    Posts
    17
    That thing is simple. But what if it is not present in the CLASSPATH or something like that? Problem for me is to put it in correct path. Everything we import, i guess we do it form a jar file. I was wondering how to put it into jar file? Or if there is any other way to import then let me know.
    And for more information, I am using windows platform. I prefer solution in windows platform, but side wise if i get solution for linux, it would be helpful to me later on.

  4. #4
    Nokia Developer Champion rahulvala's Avatar
    Join Date
    Oct 2008
    Location
    INDIA
    Posts
    2,294

  5. #5
    Registered User bunkdeath's Avatar
    Join Date
    May 2010
    Posts
    17
    Might be I am not clear myself. The link you refer says s/he have problem with javax.image.*, but his/hers java.awt.* seems working fine. My problem is, while importing java.awt.*, it gives error saying "package does not exits". My actual question is, where to put those files I downloaded in my computer location??

    Thanks

  6. #6
    Nokia Developer Champion im2amit's Avatar
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    2,903
    Put the files in the library folder of your project and then try to import using java.awt.*
    thanks,
    ~Amitabh
    (Poster of the Month -Dec'12)
    Follow me on my blog for Innovative Mobile Apps

  7. #7
    Registered User bunkdeath's Avatar
    Join Date
    May 2010
    Posts
    17
    Thank you Amitabh,
    I already tried that, it did not happen, but as I am using Netbeans as my IDE, I specified the location of that lib folder and now it works.

    Thank you all who tried to help me.

    Thanks

  8. #8
    Nokia Developer Champion im2amit's Avatar
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    2,903
    It's important that you set the required dependency of your project on all external libraries while working with IDE's like Eclipse and Netbeans.
    thanks,
    ~Amitabh
    (Poster of the Month -Dec'12)
    Follow me on my blog for Innovative Mobile Apps

Similar Threads

  1. Replies: 5
    Last Post: 2010-04-14, 10:02
  2. Import Java.awt problem
    By WinBase in forum Mobile Java Tools & SDKs
    Replies: 2
    Last Post: 2008-01-15, 08:25
  3. java.awt
    By zafalimited in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2006-02-22, 11:57
  4. java.awt
    By zafalimited in forum Mobile Java General
    Replies: 1
    Last Post: 2006-02-22, 11:55
  5. Replies: 0
    Last Post: 2002-06-11, 08:52

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved