Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
dekadenzverdikt
dekadenzverdikt's Profile
1
Posts
1
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
problem to register MouseEvent
[2 Replies]
02-Sep-2012 04:18 PM
Forum:
Library and Tool Development
i´m new to this forum and need help..
i use netbeans and i want to create a ui library.
with the method "registerDraw()" and declaring the function "draw()" inside the class, it works properly.
but when i want to "registerMouseEvent()" and declare the function "mouseEvent()" an error occurs.
Exception in thread "Animation Thread" java.lang.RuntimeException: There is no public mouseEvent() method in the class processing2.sketch$HFader
at processing.core.PApplet.die(PApplet.java:2571)
at processing.core.PApplet.registerWithArgs(PApplet.java:974)
at processing.core.PApplet.registerMouseEvent(PApplet.java:935)
at processing2.sketch$HFader.<init>(sketch.java:68)
at processing2.sketch.setup(sketch.java:26)
at processing.core.PApplet.handleDraw(PApplet.java:1608)
at processing.core.PApplet.run(PApplet.java:1530)
at java.lang.Thread.run(Thread.java:680)
in the processing ide it works, but not in netbeans.
import processing.core.*;
public class sketch extends PApplet {
PApplet app = this;
HFader hf1;
public void setup() {
size(600, 600);
frameRate(30);
noStroke();
hf1 = new HFader();
}
public void draw() {
}
public class HFader {
HFader() {
app.registerDraw(this);
app.registerMouseEvent(this);
}
public void draw() {
println("draw");
}
public void mouseEvent(MouseEvent e) {
println("mouseEvent: " + e);
}
}
}
even when i want to declare the method mouseEvent wit its parameter, netbeans says that it doesnt find a class called MouseEvent
hope someone can help me.
sorry for the bad english...
regards
«Prev
Next »
Moderate user : dekadenzverdikt
Forum