爲什麼沒有按是否」工作檢查時,如果分量等於‘’檢查Java組件是空
private boolean ControllaCampi(){
boolean verifica = true;
for (Component component : pMain.getComponents()){
if ((component.getClass().equals(JTextField.class)) || component.getClass().equals(JFormattedTextField.class))){
if (component.equals("")){
verifica = false;
break;
}
}
}
return verifica;
}
因爲組件不是字符串! – Hackerdarshi
我如何檢查是否空? – Agatino