내 버튼이 맞을 것 같아요.하지만 클릭하면 컴파일러에 정수가 추가되고 다음 및 이전 버튼을 사용하여 정수가 뺍니다. 나는 그들이 내가 연결된 파일에있는 연락처를 스크롤하도록하고 싶습니까? 내가 거 야버튼이 작동하지만 GUI가 아닌 컴파일러와 상호 작용하고 있습니까?
public void nextContact()
{
if(index < details.size() - 1)
{
index++;
System.out.println(index);
txtname.setText(name.get(index));
txtnum.setText(phone.get(index));
txtmob.setText(mobile.get(index));
txtadd1.setText(address.get(index));
}
importContacts();
}
public void prevContact()
{
if (index > 0)
{
index--;
System.out.println(index);
txtname.setText(name.get(index));
txtnum.setText(phone.get(index));
txtmob.setText(mobile.get(index));
txtadd1.setText(address.get(index));
}
importContacts();
}
"컴파일러에서 정수를 추가하는 것"은 무엇을 의미합니까? 더 많은 정보를 제공해야합니다. –
명령 창에서 다음을 클릭하면 1이 표시되고 2, 3 등이 나타납니다. 이전에는 명령 창에서 해당 값을 뺍니다. – tom1390
이 정보는 주어진 정보로 이해가되지 않습니다. –