• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Adding a selected Index from a JList box using the JButton. I'm so confused. :S

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone,

I am confused again. This time, I'm stuck on question 4 and I need some good hints to get me by.

Here's the URL for the pictorial view of the assignment.

I need to get my Movie Titles, number of copies I want to implement (Combo Box), type of movie, DVD or Blu ray and Pricing when I press the JButton "Buy".

The main idea is that I want to get things to show up.
I have been using the getSelectedIndex() feature and I've been getting values like -1. Eek?!? :S

Here is my coding so far, if you want to look at it and try to fix it.

MOVIEBUY.JAVA



MOVIEINFO.JAVA


 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
> Here is my coding so far, if you want to look at it and try to fix it.

if you follow the advice I gave in reply #1, lots of people will probably look at it

https://coderanch.com/t/437075/Swing-AWT-SWT-JFace/java/JAVA-JList
 
Nathe Chan
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Michael Dunn wrote:> Here is my coding so far, if you want to look at it and try to fix it.

if you follow the advice I gave in reply #1, lots of people will probably look at it

https://coderanch.com/t/437075/Swing-AWT-SWT-JFace/java/JAVA-JList



Does anyone have a different suggested answer?
reply
    Bookmark Topic Watch Topic
  • New Topic