Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-28-2007, 01:58 AM
Member
 
Join Date: Dec 2007
Posts: 11
BlitzA is on a distinguished road
Elements package
Hey, I'm new to java.

I've been doing it for a few weeks, once a week on MACS that are all set up to use packages.

So now I've come to do work on my PC with windows.

I've worked out how to run things like hello world, my problem is getting the elements package to work.

I've got a feeling it's something to do with pathclass?

I've been searching for about two hours trying to work out how to get this to work now, no luck.

I don't understand where to put the elements files that I downloaded or how to set classpath if that's what I'm meant to be doing.

Cheers in advance.

trying to get this to work:

Code:
import java.awt.Color; import element.*; public class demo { static DrawingWindow d; static void explain(java.awt.Color cl) { System.out.println("R="+(cl.getRed()/255d)); System.out.println("G="+cl.getGreen()/255d); System.out.println("B="+cl.getBlue()/255d); System.out.println(); } public static void main(String args[]) { // draw mystic symbol d = new DrawingWindow(); d.hold(); // draw half-gray, half-black circle d.setForeground(Color.black); d.fill(new Arc(50,50,100,100,90,180)); d.setForeground(Color.gray); d.fill(new Arc(50,50,100,100,-90,180)); // add upper and lower discs d.setForeground(Color.black); d.fill(new Oval(75,50,50,50)); d.setForeground(Color.gray); d.fill(new Oval(75,100,50,50)); /* This part, below, commented out. // draw mystic symbol d = new DrawingWindow(); d.hold(); d.setForeground(Color.black); d.setBackground(Color.gray); // draw half-black (fill), half-gray (clear) circle d.fill(new Arc(50,50,100,100,90,180)); d.clear(new Arc(50,50,100,100,-90,180)); // add upper and lower discs d.fill(new Oval(75,50,50,50)); d.clear(new Oval(75,100,50,50)); */ d.release(); } }

This is the error I get in command prompt

Code:
C:\Java>javac demo.java demo.java:2: package element does not exist import element.*; ^ demo.java:6: cannot find symbol symbol : class DrawingWindow location: class demo static DrawingWindow d; ^ demo.java:18: cannot find symbol symbol : class DrawingWindow location: class demo d = new DrawingWindow(); ^ demo.java:22: cannot find symbol symbol : class Arc location: class demo d.fill(new Arc(50,50,100,100,90,180)); ^ demo.java:24: cannot find symbol symbol : class Arc location: class demo d.fill(new Arc(50,50,100,100,-90,180)); ^ demo.java:27: cannot find symbol symbol : class Oval location: class demo d.fill(new Oval(75,50,50,50)); ^ demo.java:29: cannot find symbol symbol : class Oval location: class demo d.fill(new Oval(75,100,50,50)); ^ 7 errors
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
using elements from other classes Camden New To Java 1 03-21-2008 09:25 AM
deleting elements nalinda New To Java 2 12-06-2007 03:42 AM
JSP Scripting Elements (Scriptlets) JavaForums Java Blogs 0 08-06-2007 05:41 PM
JSP Scripting Elements JavaForums Java Blogs 0 08-06-2007 05:41 PM
Help with array of elements zoe New To Java 1 07-24-2007 07:33 PM


All times are GMT +3. The time now is 01:36 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org