-1

I am trying to figure out how to display an array in a drop down menu from swing components. I know how to create the array of strings/integers but displaying them line by line in a drop down menu seems a little challenging.

James Lockhart
  • 131
  • 1
  • 2
  • 11
  • Have you tried [this](http://stackoverflow.com/questions/17887927/adding-items-to-a-jcombobox) ? – Stefan Apr 24 '15 at 11:43

1 Answers1

1

I believe you want a JComboBox...

enter image description hereenter image description here

See How to Use Combo Boxes for more details

Or maybe you want a JMenu filled with JMenuItems

enter image description here

See How to Use Menus for more details

MadProgrammer
  • 343,457
  • 22
  • 230
  • 366