开发者

Jbutton to select and display an array item

开发者 https://www.devze.com 2023-03-16 14:24 出处:网络
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?Create a jButton. Add

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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号