Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
hal1234
hal1234's Profile
1
Posts
0
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
multiple windows
[1 Reply]
17-Sep-2010 10:02 AM
Forum:
Programming Questions
Hi Everyone,
I am trying to create a second window to use as a control panel for my app.
I have created it using the following code from a previous thread (
http://processing.org/discourse/yabb2/YaBB.pl?board=Syntax;action=display;num=1211220206)
and it works.
how can I use mouse controls in the second window?
such as mousePressed() etc...
Thanks for your help,
Hal
PFrame f;
secondApplet s;
void
setup
() {
size
(320, 240);
PFrame f =
new
PFrame();
}
void
draw
() {
background
(255,0,0);
fill
(255);
rect
(10,10,
frameCount
0,10);
s.
background
(0, 0, 255);
s.
fill
(100);
s.
rect
(10,20,
frameCount
0,10);
s.
redraw
();
}
public
class
PFrame
extends
Frame {
public
PFrame() {
setBounds(100,100,400,300);
s =
new
secondApplet();
add(s);
s.init();
show();
}
}
public
class
secondApplet
extends
PApplet {
public
void
setup
() {
size
(400, 300);
noLoop
();
}
public
void
draw
() {
}
}
«Prev
Next »
Moderate user : hal1234
Forum