![]() |
Code Examples
A repository of 155 code examples for BeepBeep
|
Display a real-time plot of the values of a slider in a Swing frame. More...
Static Public Member Functions | |
static void | main (String[] args) throws ProcessorException |
Display a real-time plot of the values of a slider in a Swing frame.
In this example, a JFrame
containing a simple slider widget is polled for its value twice per second. This value is then processed to display a 2D scatterplot with two data series:
Here is a screenshot of the two JFrames used in this example. At the left is the slider the user can move, and at the right, the generated plot that updates once per second. Notice how the use of an average (green line) smoothes the jittery motion of the raw values (blue line).
Graphically, the processor chain for this example can be represented as follows:
As one can see, this example is notable for its mix of various processors:
Definition at line 88 of file AverageSlider.java.