I am having problems designing my GUI. I am having this main method :
package gui;
import java.io.*;
public class run {
RunUSBControllerTest test;
public run ()throws NoSuchMethodException,
ClassNotFoundException,
InstantiationException,
IllegalAccessException {
for(;;){
RunUSBControllerTest test = new RunUSBControllerTest();
//Graph01 graph = new Graph01();
graphing graph = new graphing();
}
}
public class graphing {
public graphing() throws NoSuchMethodException,
ClassNotFoundException,
InstantiationException,
IllegalAccessException {
//System.out.println("before "+test.y[3] +"" +test.y[4] +""
+test.y[5]);
Graph01 graph = new Graph01();
//System.out.println("after "+test.y[3] +"" +test.y[4] +""
+test.y[5]);
}
}
public static void main(String[] args) throws NoSuchMethodException,
ClassNotFoundException,
InstantiationException,
IllegalAccessException
{
run r = new run();
}
}
The class RunUSBControllerTest just brings data into a double array
variable and then that data is plotted by the graph01 object.. the
problem is that when the data comes in a gui is created for it
showing a graph. but when new data arrives instead of refreshing the
same gui it opens up a new frame on it. I tried to make this into a
different class as well as tried using graph object in different
method so that when it exits the method it kills the object and thus
the window. Can somebody how can i refresh this window whenever data
comes in.