- if (devices != null && devices.length > 0) {
- value = null;
- dialog = new AltosDeviceDialog(frame, frameComp,
- devices,
- devices[0]);
-
- dialog.setVisible(true);
- return value;
- } else {
- /* check for missing altos JNI library, which
- * will put up its own error dialog
- */
- if (AltosUI.load_library(frame)) {
- JOptionPane.showMessageDialog(frame,
- "No AltOS devices available",
- "No AltOS devices",
- JOptionPane.ERROR_MESSAGE);
- }
- return null;
- }
+ dialog = new AltosDeviceDialog(frame, frameComp,
+ devices);
+ dialog.setVisible(true);
+ return dialog.getValue();
+ }
+
+ private AltosDevice value;
+ private JList list;
+ private JButton cancel_button;
+ private JButton select_button;
+ private JButton manage_bluetooth_button;
+ private Frame frame;
+
+ private AltosDevice getValue() {
+ return value;