Closed Thread
Results 1 to 4 of 4

Thread: Need Help With Java Program

  1. #1
    coala2000 is offline Newbie
    Join Date
    Dec 2008
    Posts
    2
    Rep Power
    0

    Question Need Help With Java Program

    I am writting a program for school that is supposed to act like a grocery store and have the cash register, inventory, checkout and the ability to add items and discontinue items.
    So my question is that want to make a check out that will display each item from a linked list and then have a textfield next to it so the user can type how many of that item that they want?
    But I do not know how to chang the amount of text fields so that it will not print to many text fields and that I am a me to talk to them to get the input?

    If anybody have any good ideas or have a different way to approach this that would be greatly liked.

    AIM : coala2000

    Please Reply
    Last edited by coala2000; 12-21-2008 at 07:40 PM.

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Join Date
    Mar 2008
    Posts
    7,145
    Rep Power
    86

    Re: Need Help With Java Program

    Not sure I understand, you want to change text in a text box?

    Code:
    txtN1.setText("");
    retrieving text
    Code:
    txtN1.getText()
    You could draw one text box for each element in the linked list.

    If that's not what you want, could you clarify better?

  4. #3
    coala2000 is offline Newbie
    Join Date
    Dec 2008
    Posts
    2
    Rep Power
    0

    Re: Need Help With Java Program

    I want to display a check out of a grocery store but the items list will change in size so it will not always be the same amount of text fields on the window.
    So I want to find a way to make that but have it change for the amount of things in the linked list?

    Also can you use a Linked list for a JComboBox?

    Thanks

  5. #4
    whitey6993's Avatar
    whitey6993 is offline Programming Expert
    Join Date
    Dec 2008
    Posts
    435
    Rep Power
    15

    Re: Need Help With Java Program

    If I understand what you are saying, the answer should be simple. Just use a loop to print out the contents of your linked list in a JLabel, and then add a text field right after the JLabel inside the layout you are using for the check.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Upload Java program
    By Escape in forum HTML Programming
    Replies: 2
    Last Post: 03-06-2011, 01:44 PM
  2. Help on my Java program
    By J_hollow in forum Java Help
    Replies: 2
    Last Post: 05-10-2010, 10:22 AM
  3. First and Hardest Java Program
    By Dyroxide in forum Java Help
    Replies: 4
    Last Post: 02-23-2009, 07:51 PM
  4. Help anyone pls!! Java program
    By DexterHol in forum Java Help
    Replies: 1
    Last Post: 11-20-2007, 11:51 AM
  5. First Java Program and .....
    By Void in forum Java Help
    Replies: 1
    Last Post: 10-03-2006, 05:27 PM

Tags for this Thread

Bookmarks

Posting Permissions

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