//for creating an array of string to store the data
private String[] data;
//for setting availble option to true
private boolean availble = true;
//for checking the information from the text
field
public boolean isCorrect() {
data = new String[10];
for (int i = 0; i < informationLabel.length;
i++) {
if
(!informationTextField[i].getText().equals("")) {
data[i] =
informationTextField[i].getText();
} else {
return false;
}
}
return true;
}
//for setting the array of JTextField to empty
public void clearTextField() {
for (int i = 0; i < informationTextField.length;
i++) {
informationTextField[i].setText(null);
}
txtShelfNo.setText(null);
}
2
Do'stlaringiz bilan baham: |