コード例 #1
0
 void propDialog_actionPerformed(ActionEvent evt) {
   String cmd = evt.getActionCommand();
   if (cmd.equals("Cancel") == false) {
     createContext(
         propDialog.getHost(),
         propDialog.getPort(),
         propDialog.getCommunityName(),
         propDialog.getSocketType());
     sendGetRequest(toid.getText());
   } else {
     // System.exit(0);
   }
 }
コード例 #2
0
  public void init() {
    try {
      createPropertyDialog();
      jbInit();

      propDialog.setVisible(true);
      propDialog.toFront();

      createContext(
          propDialog.getHost(),
          propDialog.getPort(),
          propDialog.getCommunityName(),
          propDialog.getSocketType());
      sendGetRequest(toid.getText());
    } catch (Exception exc) {
      exc.printStackTrace();
      lmessage.setText("Exception: " + exc.getMessage());
      lmessage.setBackground(Color.red);
    }
  }