Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: How to come up with this gui application involving list component?

  1. #1
    Junior Member
    Join Date
    Jan 2014
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to come up with this gui application involving 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
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,751
    My Mood
    Mellow
    Thanks
    233
    Thanked 711 Times in 697 Posts

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

    Welcome to the forum!

    What's the small part you're stuck on? What code do you have?

  3. #3
    Junior Member
    Join Date
    Jan 2014
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

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

    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.

  4. #4
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,751
    My Mood
    Mellow
    Thanks
    233
    Thanked 711 Times in 697 Posts

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

    What's preventing you from starting? I don't know what your question is. Do you know Java? Do you know Swing? Perhaps you should start with reading the data from the file and store that in an appropriate class, like Product or Toy, rather than storing in a "list component." But maybe that's what you do know how to do, and you're stuck on the next thing, or the next thing after that. We have no idea what you need help with until you tell us. Otherwise, we're faced with talking you through the whole project, and that's more than most will do.

    Think about which part of the project you need help with and ask specific questions. Since it's an exercise you've created to learn Java, just get going with it and come back when you really need help

  5. The Following User Says Thank You to GregBrannon For This Useful Post:

    jedmustdie (February 1st, 2014)

Similar Threads

  1. Replies: 4
    Last Post: January 10th, 2014, 04:25 AM
  2. Replies: 6
    Last Post: November 27th, 2012, 07:57 PM
  3. Connecting GUI with application
    By kakb9091 in forum AWT / Java Swing
    Replies: 2
    Last Post: May 13th, 2012, 08:19 PM
  4. GUI Application problem! HELP Please!
    By gpelefty90 in forum AWT / Java Swing
    Replies: 3
    Last Post: October 4th, 2011, 09:21 PM
  5. Replies: 3
    Last Post: January 31st, 2010, 11:24 PM

Tags for this Thread