예제 #1
0
 /** @return the pot */
 public static int getPort() {
   int port = 0;
   try {
     port = Integer.parseInt(pot.getText());
   } catch (NumberFormatException f) {
     f.printStackTrace();
     new WhatIDo("Entrer un port valide", f.toString());
   }
   return port;
 }
예제 #2
0
    public void actionPerformed(ActionEvent e) {
      JTextField fieldEdited = (JTextField) e.getSource();
      try {
        systemOrder = Integer.parseInt(fieldEdited.getText());
      } catch (NumberFormatException nfex) {
        System.out.println("Number format exception in getting system order");
        nfex.printStackTrace();
      }

      String updatedStatusText = prepareStatusText();
      statusAreaTop.setText(updatedStatusText);
    }