1
在我的Keyboardclass中,我有3個不同的jTextareas(jTextareas1,jTextareas2,jTextareas3)。通常我使用keyboardwindow.jTextArea1.setText()來調用它們。 或keyboardwindow.jTextArea1.setBackground();在我的主要。如何在循環中調用不同的jTextareas?
但有使用它們在一個循環中我主要是這樣一種方式:
for(int n=1; n<=4; n++){
keyboardwindow.jTextAreai.setText();
}
是的,把它們放在一個數組或List中(或任何你想要的集合),然後遍歷它們。 – byxor