查看下面的代码片段,该方法maxFont.LabelFont(Label tmp, String tmp2)
只接受字符串输入,而不接受字符串数组中的元素。当我尝试使用x[i].toString()
时,字符串会显示为Label{xxxx}
而不是只是xxxx
.
// for each column, prompt user to Insert data for that category
for (int i = 0; i < c; i++) {
maxFont.textFont(y[i]);
// Add label x[i] prompting for category value
x[i].setParent(mUpdate);
maxFont.labelFont(x[i],x[i].toString());
// Add text field tmp2 to input the new data
y[i].setParent(mUpdate);
}