I just want to create a multiple window application. i took the basic idea from the following code
import controlP5.*;
ControlP5 cp5;
PFrame f;
thirdApplet mesg;
Button alarm,ok;
void setup() {
size(400, 500);
f = new PFrame();
cp5 = new ControlP5(this);
alarm=cp5.addButton("alarms")
//.setValue(0)
.setPosition(100,100)
.setSize(200,19)
;
}
void draw() {
background(0,0,255);
fill(255);
rect(10,10,frameCount%100,10);
if(alarm.isPressed())
{
mesg.background(0,255,0);
mesg.fill(255,0,0);
mesg.rect(10,10,20,20);
mesg.redraw();
}
}
public class PFrame extends Frame {
public PFrame() {
setBounds(100,100,400,300);
mesg = new thirdApplet();
add(mesg);
mesg.init();
show();
}
}
public class thirdApplet extends PApplet {
public void setup() {
size(400, 300);
background(0,0,255);
ControlP5 cp;
cp=new ControlP5(this);
cp.addTextfield("input")
.setPosition(20,200)
.setSize(200,40)
.setFocus(true)
.setColor(color(255,0,0))
;
//.setValue(0)
noLoop();
}
public void draw() {
}
}
i want to transfer the data i am reading through serial port from first form to the next form by clicking one button and display the data in the text field in the second window. I want to add buttons and other controlp5 controls in both the forms. But i am getting null pointer exception the line 53. How to add controlp5 objects to the second window. Any help would be appreciated. pLease respond
I am developing an application to monitor UPS parameters and status. I developed the application using Processing 1.2.1, which reads and records parameters through serial ports in every approx 3 seconds. I need to enhance the functionality by plotting the graph of critical parameters. I am using "gwoptics" library for plotting and the class is RolloingLine2DTrace. First i tried with the example program "rolling graph". I customized the "eq" functions according to my application and it worked fine. But when i incorporated the same codes to my application the "x values" started to over write each values after some time x axis becomes a black pacth with values. I think the issue with the timing of the updates. i tried different values. but no use. I tried to change the the 'tickincrease', 'refreshrate" in example code. it worked fine with change in speed according to the parameters. but in my application it is a different story. Could you please help me to come out of this problem? How to calculate the exact 'tikincreaserate' , refreshrate, and Xaxis value?
each x value is getting overwritten by the value in right as the time goes and finally it becomes illegible
I was programming with processing 1.2.1 using controlp5 controllers. i need to develop an application with multiple tab widgets. i have created 'labels' , 'textfields' and 'buttons'. i want to customize each tab such that one button shown in one tab should not be visible in another tab. i have used the following codes to move each items to various tabs.
When the application starts, it looks fine. the default tab is not displaying controllers from other tabs. But after selecting other tabs, when the controllers come, they wouldn't go even after selecting another tab. They are permanently visible. I used "hide()' and 'setVisible(false)' to hide the items. in that case, they are not accessible from other widgets, but they are visible. please someone help me to manage the visibilty of each tab items.
ANY HELP WOULD BE APPRECIATED. THANK YOU..... PLEASE REPLY, IT MAY BE SIMPLE FOR YOU, BUT I AM STUCK WITH. HELP ME