Results 1 to 20 of 20
Like Tree2Likes
  • 1 Post By Daryn
  • 1 Post By JosAH

Thread: Inventory Program Help

  1. #1
    rjyusmc2005 is offline Member
    Join Date
    Jan 2014
    Posts
    1
    Rep Power
    0

    Question Inventory Program Help

    I'm working on an assignment for school, and am having a lot of difficulty with it. I have been creating a Java program to track inventory using an array. I need to add a search function to it to take a term, input through a text field, and locate a matching instance within the array. How can I code a JButton to grab test input from a JTextField and search for it within the array then display the corresponding information? I also need to add buttons to add and delete items as well. Could someone point me in the right direction for resources that CLEARLY explain how to do this? Any assistance would be greatly appreciated.

  2. #2
    PhHein's Avatar
    PhHein is offline Senior Member
    Join Date
    Apr 2009
    Location
    Germany
    Posts
    1,430
    Rep Power
    7

  3. #3
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,972
    Rep Power
    5

    Default Re: Inventory Program Help

    Wrong attitude. "Can someone show me a document which shows me how to do all the stuff so I don't have to think about it myself?"

    Treat it as a puzzle man, its a fun challenge. You have little pieces; buttons, listeners, input fields, a window. Now how do you put all those little pieces together so they form the picture you want? You should be wanting to figure that out yourself because then you're really learning to build something in stead of only copying someone else's notes.

    So step one: reason which pieces you are going to need and research them.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

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

    Default Re: Inventory Program Help

    But, but, are you implying that Java doesn't have a JInventoryButtonThatAutomagicallytDoesItAllForMe class? I knew it was a lousy language ...

    kindest regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  5. #5
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,972
    Rep Power
    5

    Default Re: Inventory Program Help

    Now that's unfair, that's not what the OP was asking for at all. He was only asking for magical documentation that explains how to build his particular application.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

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

    Default Re: Inventory Program Help

    Quote Originally Posted by gimbal2 View Post
    Now that's unfair, that's not what the OP was asking for at all. He was only asking for magical documentation that explains how to build his particular application.
    If there ain't such class, there ain't such documentation either in that lousy language.

    kindest regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  7. #7
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,972
    Rep Power
    5

    Default Re: Inventory Program Help

    lol :) Is there something you need to share with the group perhaps? Your replies have been a bit... harsh of late.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  8. #8
    superhaNds is offline Senior Member
    Join Date
    Apr 2013
    Location
    Sweden
    Posts
    264
    Rep Power
    2

    Default Re: Inventory Program Help

    Quote Originally Posted by gimbal2 View Post
    lol :) Is there something you need to share with the group perhaps? Your replies have been a bit... harsh of late.

    Must be the coffee again.

  9. #9
    PhHein's Avatar
    PhHein is offline Senior Member
    Join Date
    Apr 2009
    Location
    Germany
    Posts
    1,430
    Rep Power
    7

    Default Re: Inventory Program Help

    Quote Originally Posted by gimbal2 View Post
    lol :) Is there something you need to share with the group perhaps? Your replies have been a bit... harsh of late.
    ??? Maybe he's suffering from cenosillicaphobia again. Send a couple bottles of Grolsch, if you want friendly replies from Jos. ;)
    Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]
    The Ubiquitous Newbie Tips

  10. #10
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,972
    Rep Power
    5

    Default Re: Inventory Program Help

    Of course, why didn't I see that myself!
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

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

    Default Re: Inventory Program Help

    Quote Originally Posted by gimbal2 View Post
    Of course, why didn't I see that myself!
    See? That's why I call PhHein, 'friend', while I consider you just a vague acquaintance ... the crates of Grolsch can be delivered at the barn anytime now.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  12. #12
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,972
    Rep Power
    5

    Default Re: Inventory Program Help

    Meh, vague acquaintance works just fine for me. Give me another few months and we'll be proper enemies.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  13. #13
    Daryn is offline Senior Member
    Join Date
    Oct 2012
    Posts
    176
    Rep Power
    2

    Default Re: Inventory Program Help

    But proper enemies are no fun. You need to get real buddy buddy, then discover all his weaknesses and use those. Than you will not only be a proper enemy but a worthy one too.
    gimbal2 likes this.
    With the right know how, anything is possible

  14. #14
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,972
    Rep Power
    5

    Default Re: Inventory Program Help

    Ha, you're proper evil. I like you.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

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

    Default Re: Inventory Program Help

    I hate you all and I hate Java too; especially the sissy verbosity and because everything is so well defined; what happened to all the fun in the world when everything was C and vaxen and pointers were words?

    kind regards,

    Jos *sob* <--- attack of nostalgia
    cenosillicaphobia: the fear for an empty beer glass

  16. #16
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,972
    Rep Power
    5

    Default Re: Inventory Program Help

    That "kind regards" just makes that post epic in stead of dark.

    Aaaaaah yes, the days of C programming. Spending a week trying to hunt down a single memory access violation with shoddy debugging tools. Good times. Yeah Java is really a step back.

    @rjyusmc2005. Yes we hijacked your thread, no this is in any way no longer about you or whatever problem you were having and if you want to take offense don't, because it's all just intended stupidity at your expense. Welcome to the Java forums, where we all hate each other and mods can be bribed with Grolsch!
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  17. #17
    Daryn is offline Senior Member
    Join Date
    Oct 2012
    Posts
    176
    Rep Power
    2

    Default Re: Inventory Program Help

    Quote Originally Posted by JosAH View Post
    I hate you all and I hate Java too; especially the sissy verbosity and because everything is so well defined; what happened to all the fun in the world when everything was C and vaxen and pointers were words?

    kind regards,

    Jos *sob* <--- attack of nostalgia
    i know how to fix this. :) smileys fix everything.... i think
    With the right know how, anything is possible

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

    Default Re: Inventory Program Help

    Quote Originally Posted by gimbal2 View Post
    mods can be bribed with Grolsch!
    Yes! Mods can be bribed with one thing: Grolsch and espresso coffee! I mean mods can be easily bribed with two things: Grolsch, espresso coffee and black tobacco! Wait ... mods can be bribed with three things: Grolsch, epresso coffee, black tobacco and scantily clad women! Oh, I can't do this; you have to do it ...

    kind regards,

    The Spanish Inquisition
    gimbal2 likes this.
    cenosillicaphobia: the fear for an empty beer glass

  19. #19
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,972
    Rep Power
    5

    Default Re: Inventory Program Help

    True that. That's an excellent way to say something without having to pay for the consequences; just put a smiley after it and then if people call you out you can just say "Dude, it was a joke!". And if they don't you can pretend it was serious after all. The smiley is the best invention in the history of the internet.

    Quote Originally Posted by JosAH View Post
    Oh, I can't do this; you have to do it ...
    I understand, here goes: GROUP HUG!
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  20. #20
    Daryn is offline Senior Member
    Join Date
    Oct 2012
    Posts
    176
    Rep Power
    2

    Default Re: Inventory Program Help

    Quote Originally Posted by JosAH View Post
    Yes! Mods can be bribed with one thing: Grolsch and espresso coffee! I mean mods can be easily bribed with two things: Grolsch, espresso coffee and black tobacco! Wait ... mods can be bribed with three things: Grolsch, epresso coffee, black tobacco and scantily clad women! Oh, I can't do this; you have to do it ...

    kind regards,

    The Spanish Inquisition
    you forgot cash. cash, coffee, and scantily clad womens
    With the right know how, anything is possible

Similar Threads

  1. Button Help in Inventory Program
    By huggy11911 in forum AWT / Swing
    Replies: 2
    Last Post: 06-23-2012, 07:21 AM
  2. My Inventory Program
    By ladykrimson in forum New To Java
    Replies: 28
    Last Post: 11-01-2010, 09:06 PM
  3. Help with Inventory Program, Please
    By NewKidjava in forum New To Java
    Replies: 4
    Last Post: 08-21-2009, 11:09 AM
  4. Inventory Program
    By tlouvierre in forum New To Java
    Replies: 5
    Last Post: 05-17-2009, 05:09 AM
  5. Inventory program
    By Nexcompac in forum New To Java
    Replies: 3
    Last Post: 07-27-2007, 05:51 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
  •