Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Java Programming for Beginners

You're reading from   Java Programming for Beginners Learn the fundamentals of programming with Java

Arrow left icon
Product type Paperback
Published in Oct 2017
Publisher Packt
ISBN-13 9781788296298
Length 318 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
SkillSprints Inc., Mark Lassoff SkillSprints Inc., Mark Lassoff
Author Profile Icon SkillSprints Inc., Mark Lassoff
SkillSprints Inc., Mark Lassoff
Arrow right icon
View More author details
Toc

Event handling

One of the best things about working in Java is how powerful its GUI extension libraries are and just how quickly we can get a program up and running that not only has functional code, but also has a slick, professional-looking user interface to back it up that would help anyone interact with our program. That's what we're going to do now: connect the design interface for basic username and password validation with some backend code that we're going to write which will actually check two text fields to see whether they're the ones we're looking for.

To start off, we have the basic GUI with a text field where someone can put a username and password, which will just show up as stars:

Adding a button

...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime