### NeXtMidas JavaBeans

NeXtMidas enables you to package most graphical primitives and macros as JavaBeans, and put them in a GUI.

JavaBeans support the following NeXtMidas tasks:

- Design panels for existing NeXtMidas macros with GUI-Builder.
- Embed NeXtMidas primitives (such as `PLOT`) into new graphical primitives.

#### Using a GUI-Builder to Build NeXtMidas Panels

Engineers will find that building NeXtMidas panels with a GUI-Builder is extremely helpful. It allows you, an engineer, to write macros with a focus on data processing, not asthetics or event handling. Later, you can create the GUI with no impact on the macro's functions.

Unlike the X-Midas approach to using GUI builders (which requires engineers to write Python code), NeXtMidas does not require an engineer to write any Java code. With NeXtMidas, you simply draw out the panel using the GUI-Builder, and NeXtMidas does the rest. You tell the macro to use the panel you just created by calling the macro with the `/JSETUP` switch.

Old SD360 Panel | SD360 Panel Built in NetBeans

By following these few simple rules, you can confidently design NeXtMidas to incorporate each widget created in the GUI-builder to work as you intend:

- The class generated by the GUI-builder extends `JFrame` and has a no-argument constructor. (This is the default in most GUI-builders.)
- The name of each MidasDisplay matches the ID used in the macro.
  Example: If the macro makes a plot with `PLOT/ID=fft`, then also name the MidasDisplay plot with `fft`.
- The name of each control widget matches the one used within the macro.
  Example: If the macro makes a `GCONTROL` with the name `pause`, then the widget's name in the GUI-builder is also `pause`.
- No two things have the same name. Java allows this if the case differs (e.g., `myfft` and `myFFT`), NeXtMidas does not.

For information on how to use the GUI-builder in NetBeans, see NetBeans.

#### Embedding NeXtMidas Primitives into a Graphical Primitive

Programmers will like embedding primitives into graphical panels they create. The `nxm.sys.libg.MidasBean` class allows programmers to design their own graphical primitives and then display NeXtMidas plots in them.

For more details, refer to the JavaDoc page for the version of `nxm.sys.libg.MidasBean` included with NeXtMidas.