我需要使用 forloop 和 text_fields 实例变量来实例化每个文本字段,使其成为侦听器,并将其添加到小程序中。text_fields 变量是一个数组,其最大数组数为 2。
Container c = getContentPane();
c.setLayout(new FlowLayout());
int i = 0;
for (i = 0; i < FIELDS; i++)
{
THIS IS WHERE I DON'T KNOW WHAT TO WRITE.
i need to instantiate the arrays, make them listeners and
add them to the applet.
}