new AlertDialog(frame, "Number Format Error", "Please enter values between 0 and 7 for the skill values.").show();
new AlertDialog(client.frame, "Number Format Error", "Please enter values between 0 and 7 for the skill values.").show();
    public void actionPerformed(java.awt.event.ActionEvent actionEvent) {        if (actionEvent.getSource() == butOkay) {            // get values            String name = fldName.getText();            int gunnery;            int piloting;            try {                gunnery = Integer.parseInt(fldGunnery.getText());                piloting =  Integer.parseInt(fldPiloting.getText());            } catch (NumberFormatException e) {                new AlertDialog(frame, "Number Format Error", "Please enter valid numbers for the skill values.").show();                return;            }                        // keep these reasonable, please            if (gunnery < 0 || gunnery > 7 || piloting < 0 || piloting > 7) {                new AlertDialog(frame, "Number Format Error", "Please enter values between 0 and 7 for the skill values.").show();                return;            }                        // change entity            entity.crew = new Pilot(name, gunnery, piloting);            okay = true;        }                this.setVisible(false);    }