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.
Page Index Toggle Pages: 1
Wacom with jWintab (Read 3605 times)
Wacom with jWintab
Jan 26th, 2006, 9:19pm
 

Has anyone got this working with the latest version of Processing? I'd like to experiment but version 67 is a bit far back to go Smiley

http://www.pitaru.com/jwintab_v2/
Re: Wacom with jWintab
Reply #1 - Jan 27th, 2006, 12:47am
 
Check out my JTablet, it's a native Java library that's a lot easier to install and even works on applets (if the user installs JTablet).

http://www.cellosoft.com/sketchstudio/

It's a little higher level than typical processing, but gives you much more control and power.

Marcello
Re: Wacom with jWintab
Reply #2 - Jan 28th, 2006, 12:27pm
 

Hi

Thanks for your reply,

Can you provide instructions on how to get it installed and working with Processing?

You may want to consider turning it into a Processing library at some point.

Chris
Re: Wacom with jWintab
Reply #3 - Jan 28th, 2006, 7:55pm
 
Sure.

Download and install JTablet.

Now load up processing and try this code:
Code:
import cello.tablet.*;

JTablet jtablet = null;

void setup() {
size(200,200);
try {
jtablet = new JTablet();
} catch (JTabletException jte) {
println("Could not load JTablet! (" + jte.toString() + ").");
}
smooth();
}

void draw() {
try {
// Get latest tablet information
jtablet.poll();
} catch (JTabletException jte) {
println("JTablet Error: " + jte.toString());
}

ellipseMode(CENTER);

if (mousePressed && jtablet.hasCursor()) {
// Get the current cursor
JTabletCursor cursor = jtablet.getCursor();
fill(0);
noStroke();
ellipse(mouseX, mouseY, cursor.getPressureFloat() * 20, cursor.getPressureFloat() * 20);
}
}


That should do it.

You will probably want to download the SDK from the sketchstudio website.

This includes the .jar/.dll files along with the documentation.

If you want to make processing applets that work even if the user does not have JTablet installed, copy the jtablet.jar file to the sketch's data directory.

Marcello
Re: Wacom with jWintab
Reply #4 - Feb 25th, 2006, 3:42am
 
I've written a quick Processing hacks entry about Wacom tablets. Marcello, I hope you don't mind that I used your code example, you are properly credited in the code. You don't mention that you need to copy the jtablet.jar and .dll into the code folder, I assume you do need that
Re: Wacom with jWintab
Reply #5 - Mar 30th, 2006, 4:17am
 
Didn't see this reply till now (linked from processing hacks, ironically).

If the user has installed JTablet, you do not need to include either the dll or the jar, they'll automatically be found by the Java VM.  So in that sense, no you do not need to copy them to your code folder.

However, my recommendation would be to include the .jar file for applets.  The advantage is the applet will still load even if the user has not installed JTablet, but "new JTablet()" will throw an exception you can catch.

Marcello
Page Index Toggle Pages: 1