Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
markstewie
markstewie's Profile
2
Posts
2
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
Using Java classes
[3 Replies]
14-Jan-2013 11:06 PM
Forum:
Programming Questions
Hi there,
I'm going through Dan Shiffman's book "The nature of code" at the moment.
In one of the "random number" examples he mentions that we can make use of a class know as
Random
which is part of the default Java libraries imported into processing. (
http://docs.oracle.com/javase/6/docs/api/java/util/Random.html)
However when I use this I get the error "Cannot find a class or type named Random". How would I get this to work?
Here is the example.
Random generator;
void setup(){
size(640,360);
generator = new Random();
}
void draw(){
float num = (float)generator.nextGaussian();
float sd = 60;
float mean = 320;
float x = sd * num + mean;
noStroke();
fill(255,10);
ellipse(x,180,16,16);
}
ControlP5 ControlFont not working
[2 Replies]
27-Dec-2010 01:01 AM
Forum:
Contributed Library Questions
Hi there,
I'm using the controlP5 library and trying to use the .setControlFont method.
I'm using the following code.
controlP5 = new ControlP5(this);
controlP5.setControlFont(new ControlFont(createFont("Arial",15), 15));
And the compiler is giving me an error that says...
IllegalAccessError: tried to access field processing.core.PFont.smooth from class controlP5.ControlFont
I'm using the latest versions of both Processing and the ControlP5 library. I can't see where I'm going wrong. Any help would be appreciated.
Thanks, mark.
«Prev
Next »
Moderate user : markstewie
Forum