Печать
Просмотров: 460





Код внутри метода actionPerformed():

String str = textField.getText().trim();
if (str.isEmpty()) {
	JOptionPane.showMessageDialog(null, "Введите имя!");
} else {
	JOptionPane.showMessageDialog(null, "Привет! " + str);
}



Код после занятия


Вложения:
Скачать этот файл (prog_mod2_les08_end.java)prog_mod2_les08_end.java[ ]2 Кб