We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › import from classes
Page Index Toggle Pages: 1
import from classes? (Read 556 times)
import from classes?
Dec 26th, 2005, 2:06am
 
hey all!

i've been searching around, but no solutions for my problem so far.. maybe you can help me:

i have a couple of classes and one of them needs to import

net.java.games.input.*

for the "Component" type. however, i don't seem to find the right place to call

import net.java.games.input.*;

is it in the main program? in the class that calls the Component type? both didn't work ... :-/

thanks alot!
fabian
Re: import from classes?
Reply #1 - Dec 29th, 2005, 4:03pm
 
you can put an "import" at the beginning of your sketch and that will work fine. was it giving you an error? also, you shouldn't really ever have to do this (see below).

perhaps more likely is that you're missing the jar file that includes net.java.games.input. find that file, and use "add file" from the "sketch" menu to add it. this will place the jar file in a folder of your sketch called "code", and automatically (but transparently) add the import statement to your code as well.
Page Index Toggle Pages: 1