• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JMenus - Existing User Password and Populating Fields

 
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everyone!! I am having two problems with a JMenu program I am working on. First, the Existing User Panel - I know that I need a for loop to determine if the password entered for an existing user is in the ArrayList Users, however when determining if the password entered is "terminator" (which is the guest password) I do not need it, so I am having trouble determining the best way to set this up. Does anyone have any ideas for me?



The second thing I am struggling with is populating the data fields in the Current Salesman Panel. I am just not quite sure how to go about this. What I would like to happen is when a user enters the name of a Salesman then their previous entry of information pops up in all of the fields and then the next time their name is entered the newest data after that pops up into the fields. Anyone have any ideas for this part?



I will post the entire code if anyone needs/wants me to. I wasn't sure if it would be easier to just show the parts that I am unsure of or the whole thing, so if you would like me to post the whole thing I would be happy to. I would greatly appreciate any tips or help anyone could give me. Thank you so much in advance.

Oh also, on a text area called output is their a way to put a JScrollPane? Here is an example of a text area I am using:



Thanks again!!!
 
Holly Leery
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I realize my post above was probably not the best, I didn't really know how to post and ask those couple of questions without posting all of that long code. I apologize for that. I have been trying to get that for loop in the existing user panel to work for a couple of days now and I am sure it is ridiculously easy, I just dont see it. I decided to repost just that little part of the code. I am trying to test if guest and terminator are entered by the user (which are the default passwords) and then also if any exitsing user has entered a name a password...for this I check the User array list I created. I know I need to run through the array and that is why I used for (Users user : myList), but it doesn't seem to want to work properly, is there a better way to set up this for loop? Thank you for any help you may be able to give, if you don't have time, I understand.



Also, I really do not know what to post for the populating data fields part, I just want to popualte a text field and two combo boxes when a user enters a name into a Salesman Text Field, is there a way of doing this? Maybe there is some reference I could look at. I hope this post is a little better than the long one above. Again, thank you for any help you may be able to point in my direction and for your time. I very much appreciate it.
 
reply
    Bookmark Topic Watch Topic
  • New Topic