for ループがあり、次の 3 日間の気象条件を出力する API があります。
for (ForecastForday1 day : forecast)
{
// Print out what day the forecast is for, and
// the conditions on that day
System.out.println("The weather on " + day.getDayOfWeek()
+ " will be " + day.getInfo("Conditions"));
}
しかし、私は3つのJTextAreaを持っているので、ループが繰り返されるたびにデータを1つのテキスト領域に配置し、次に次のテキスト領域にデータを配置します。
私のテキストエリア:
day1.append("");
day2.append("");
day3.append("");
したがって、このループにループを配置する必要があると思いますが、どこから始めればよいかわかりません。