0

I'm rather new to programming, so please bear with me if I'm a bit ignorant. I've created a program with the purpose of randomly choosing an object, and displaying the name and icon contained within. These icons and names are chosen from an imported text document, making adding more entries as easy as adding another line to the document. I should add that the program is using a UI generated by NetBeans. I think it's using a UI builder called Swing or JFrame. This all works fine.

My problem is that I'm looking to add checkboxes to the interface, so I can exclude individual objects from the randomzier. I need a way to make the program create a checkbox for each object contained in the ArrayList I've created them in. I'm drawing a complete blank here, so I don't have any code to show. What are some ways to achieve this? It should be expandable by just adding lines to the imported text document, and without recompiling.

I'm thinking that I'll make the program check whether the object that is randomly chosen is checked or not. If it is unchecked, it should choose another one. This part I think I'll be able to do, but the checkboxes them selves, I'm having trouble with.

Mil
  • 13
  • 2
  • 1
    Welcome to SO. Please **visit** the **[help center](http://stackoverflow.com/tour)** and take the tour to see what and how to ask. HINT: Post codes and efforts – – B001ᛦ Aug 15 '17 at 09:04
  • If this is not a duplicate, please [edit] your question to include a [mcve] that shows your revised approach. See also these [examples](https://stackoverflow.com/search?tab=votes&q=%5bjtable%5d%20boolean.class). – trashgod Aug 15 '17 at 10:41

0 Answers0