• Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Nathe Chan
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • 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


 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • 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

http://www.coderanch.com/t/437075/Swing-AWT-SWT-JFace/java/JAVA-JList
 
Nathe Chan
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • 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

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


Does anyone have a different suggested answer?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!