+
+ timer = new Timer(1000, new ActionListener () {
+ public void actionPerformed(ActionEvent evt) {
+ update_devices();
+ }
+ });
+
+ addComponentListener(new ComponentListener() {
+ public void componentShown(ComponentEvent e) {
+ timer.start();
+ }
+ public void componentMoved(ComponentEvent e) {
+ }
+ public void componentResized(ComponentEvent e) {
+ }
+ public void componentHidden(ComponentEvent e) {
+ timer.stop();
+ }
+ });
+