• 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

MySQL Login Form

 
Greenhorn
Posts: 22
Android Netbeans IDE Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

Im new to swing, and im trying to develop an aplication. First One im trying to do a new login form.
My Project looks like this:

  • connection
  • entity
  • manager
  • gui


  • On connection i have this:



    On entity i have this:



    On Manager i have this:



    Now i just want to use the gui for validate the data that user introduce this action invoking the method ValidaUsuario() on my Manager, ok i want to use the parameters taking from the gui textUsr and txtPwd and validating that exist on database. How i can do that? Thanks for your help.
     
    Bartender
    Posts: 11497
    19
    Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Welcome to the Ranch.

    Your question is a bit ambiguous. Are you having trouble creating and passing the usuario* object or validating the credentials with the DB?
    *Java naming conventions dictate this should be Usuario and not usuario. Same with other classes.
     
    Ronald Alarcon
    Greenhorn
    Posts: 22
    Android Netbeans IDE Redhat
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Maneesh Godbole wrote:Welcome to the Ranch.

    Your question is a bit ambiguous. Are you having trouble creating and passing the usuario* object or validating the credentials with the DB?
    *Java naming conventions dictate this should be Usuario and not usuario. Same with other classes.



    i forgot conventions... but my problem its validate the credentials whit the db, its just beacuse i dont have idea how to do that...
     
    Maneesh Godbole
    Bartender
    Posts: 11497
    19
    Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Ok. So essentially your problem is not with the GUI but making DB queries. I will move this topic over to the JDBC forum for you where such questions are usually discussed.
     
    Marshal
    Posts: 28193
    95
    Eclipse IDE Firefox Browser MySQL Database
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    I don't understand... your code already has an example of a PreparedStatement which inserts data, with a specific user ID and password, into your Usuario table. Then what is so difficult about writing a PreparedStatement which selects rows from that table with a specific user ID and password?
     
    With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    reply
      Bookmark Topic Watch Topic
    • New Topic