private int initSpeed() {
        int resSpeed = 0;
        String vitesse = jTextField3.getText();
        try {
            resSpeed = Integer.parseInt(vitesse);
            if (resSpeed < 300) {
                jTextField3.setText("300");
                resSpeed = 300;
            }
        } catch (NumberFormatException e) {
            System.err.println("vitesse incorrecte");
            jTextField3.setText("300");
        }
        return resSpeed;
    }