Esempio n. 1
0
  public void init() {
    setLayout(new GridLayout(0, 2));
    selectButton = new Button("select");
    add(selectButton);
    selectButton.addActionListener(this);

    acquireButton = new Button("acquire");
    add(acquireButton);
    acquireButton.addActionListener(this);

    scanner = Scanner.getDevice();
    scanner.addListener(this);

    try {
      File home = new File(System.getProperty("user.home"));
      dir = new File(home, "My Documents");
      if (!dir.exists()) {
        dir = home;
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
  }