3 Replies - 530 Views - Last Post: 02 August 2015 - 07:58 AM Rate Topic: -----

#1 Winlae   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 02-August 15

I want to display my array fooditem[8] in the Gui list using looping.

Posted 02 August 2015 - 12:34 AM

I want to display my array fooditem[8] in the Gui list using looping.
Is This A Good Question/Topic? 0
  • +

Replies To: I want to display my array fooditem[8] in the Gui list using looping.

#2 g00se   User is offline

  • D.I.C Lover
  • member icon

Reputation: 3744
  • View blog
  • Posts: 17,121
  • Joined: 20-September 08

Re: I want to display my array fooditem[8] in the Gui list using looping.

Posted 02 August 2015 - 01:57 AM

?? Not nearly enough info ...
Was This Post Helpful? 0
  • +
  • -

#3 Winlae   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 02-August 15

Re: I want to display my array fooditem[8] in the Gui list using looping.

Posted 02 August 2015 - 03:44 AM

I have the array of fooditems[6]....and with gui frame...i have combo box and list and some textfields.i want to add contents of array into my jlist..which will later use for selection.
Was This Post Helpful? 0
  • +
  • -

#4 Inchidi   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 18
  • Joined: 21-July 15

Re: I want to display my array fooditem[8] in the Gui list using looping.

Posted 02 August 2015 - 07:58 AM

jList.setModel(new javax.swing.AbstractListModel() {
            fooditems;
            public int getSize() { return fooditems.length; }
            public Object getElementAt(int i) { return fooditems[i]; }
        });


Was This Post Helpful? 0
  • +
  • -

Page 1 of 1