Results 1 to 4 of 4
  1. #1
    johnson84 is offline Member
    Join Date
    Feb 2014
    Posts
    2
    Rep Power
    0

    Default How to come up with this gui application with list component?

    Hello, I am learning Java on my own and I am taking on very small project by myself for fun, and I'm just stuck on this small part of the project.
    So I have created a text file that contains a small list of toy names and prices, like:

    Barbie, 12.95
    Lego, 15.99
    Hot Wheels, 5.00
    Power Rangers, 6.49

    And what I would like is my application to read the contents of the file and store the toy names in a list component. And then I want to be able to select a toy name from the list and add it
    to a shopping cart that is a list component as well. I want to the application to have menu items and buttons to allow me to remove items from the shopping cart, clear the shopping cart of all
    selections, and check out. When I check out, the application should calculate and display the subtotal of all the toy names in the shopping cart, the sales tax (which can just be 8 percent of
    the subtotal), and the total.

    Please help create this simple application example I've just made up, and I'm going to add and use this example to create a bigger application myself. I truly appreciate it. Thank you!

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,783
    Blog Entries
    7
    Rep Power
    21

    Default Re: How to come up with this gui application with list component?

    Have you checked the API documentation for the JList class?

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    johnson84 is offline Member
    Join Date
    Feb 2014
    Posts
    2
    Rep Power
    0

    Default Re: How to come up with this gui application with list component?

    Quote Originally Posted by JosAH View Post
    Have you checked the API documentation for the JList class?

    kind regards,

    Jos
    Hello there! This is the small part of a pretty big project that I am working on. So I am just stuck on where to begin which such application, because I was just planning to reference this to create a similar application but with my twist to it. Interested in desktop app with a UI. If you can come up with the code for the application, it would be so helpful for me and I would greatly appreciate it.

  4. #4
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,783
    Blog Entries
    7
    Rep Power
    21

    Default Re: How to come up with this gui application with list component?

    Quote Originally Posted by johnson84 View Post
    Hello there! This is the small part of a pretty big project that I am working on. So I am just stuck on where to begin which such application, because I was just planning to reference this to create a similar application but with my twist to it. Interested in desktop app with a UI. If you can come up with the code for the application, it would be so helpful for me and I would greatly appreciate it.
    You bet, but that is not how this forum works; you have to write the code and when you're stuck you can ask specific questions here and we'll try to help you out. Now you have a starting point: the API documentation of the JList class; good luck.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. Replies: 4
    Last Post: 01-29-2013, 07:40 AM
  2. Replies: 7
    Last Post: 05-17-2012, 08:25 AM
  3. Replies: 0
    Last Post: 01-23-2012, 05:49 PM
  4. Replies: 0
    Last Post: 01-20-2012, 08:09 PM
  5. Replies: 0
    Last Post: 01-16-2012, 02:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •