/** @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; }
public void actionPerformed(ActionEvent e) { if (e.getSource() == cancel) dispose(); else try { long wohin = Long.parseLong(postf.getText(), 16); long wieweit = Long.parseLong(sizetf.getText(), 16); if (parent.hv.goTo(wohin, wieweit)) dispose(); } catch (NumberFormatException ex) { postf.setText(ex.toString()); return; } }