0

Hey guys I have a real simple program I want to make.

One button that when clicked will display an item from an array list. What is the easiest way to achieve this?

1
  • Do you want a specific item from an array or a random? Commented Nov 3, 2011 at 9:06

1 Answer 1

1

Create a jButton. Add a Actionlistener to the button. In the actionlistener method create a loop that will go through all the data in array list and print it in screen or wherever you want.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.