Important alert: (current site time 7/31/2014 7:09:25 AM EDT)
 

article

Complete Java GUI Tutorial - Beginner to Expert!

Email
Submitted on: 3/1/2003 9:45:27 AM
By: Donny Nadolny 
Level: Beginner
User Rating: By 56 Users
Compatibility: Java (JDK 1.1), Java (JDK 1.2)
Views: 232005
(About the author)
 
     Packed with OVER 25 FULLY COMMENTED CODE EXAMPLES this tutorial teaches you everything from how to make a button to advanced event handling. It assumes NO PREVIOUS JAVA KNOWLEDGE! I include a screenshot of all the programs so you know what it should look like. It's divided into two sections - The first to teach you everything about the objects such as buttons, labels, and text fields. The second to teach you how to handle all the events the objects make. In the first part, you will learn all about: Buttons, Labels, Text Fields, Text Areas, Check Boxes, Radio Buttons, Drop Down Lists, Panels, 3 different Layout Managers. In the second part, you'll learn about all the events that the above objects use, complete with working examples for everything I demonstrate. Please leave a comment and vote!

This article has accompanying files
 
 
Terms of Agreement:   
By using this article, you agree to the following terms...   
  1. You may use this article in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this article from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the article or article's description.
				The tutorial and more than 25 code examples is in the zip file.

winzip iconDownload article

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this article, you agree to the following terms...   
  1. You may use this article in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this article from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the article or article's description.


Other 3 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this article (in the Beginner category)?
(The article with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments

3/1/2003 11:15:31 AMRonaldo Sanchez Jr.

Did you really write all of this? Thanks! This has helped me a LOT. I can tell a lot of work went into this. 5 globes without a doubt.
(If this comment was disrespectful, please report it.)

 
3/1/2003 11:17:01 AMŠonny Nadolny

Heh, yah, I did this tutorial last month... I read a few books and tried to put together the best information from all of them. Glad to hear it worked!
(If this comment was disrespectful, please report it.)

 
3/1/2003 11:27:54 AMRonaldo Sanchez Jr.

Yeah but it's not as complete in _some_ areas as it could be.
(If this comment was disrespectful, please report it.)

 
3/1/2003 12:35:26 PMSteven Jacobs

Donny, I gave you 3 globes for your hard work you put into this. However, this tutorial is primarily for beginners only. You do not really cover the advance techniques of event handling or even the advance GUI elements that can be used on the web (like swing components and more layout managers). However, you did a good job for beginners and they will like this tutorial. Keep up the good work.
(If this comment was disrespectful, please report it.)

 
3/1/2003 5:02:34 PM

nice tutorial, helped a lopt. i'm just beginning to learn java and this tutorial was great! thnx
(If this comment was disrespectful, please report it.)

 
3/3/2003 2:46:23 AMvbnick

YOU ARE VERY VERY GENERIOUS TO SUBMIT THIS....BRAVO.....GAVE U 5 BIG AND SHINY GLOBS...:))
(If this comment was disrespectful, please report it.)

 
3/3/2003 11:08:47 AMFatbob

Thank you for the time you put into this, and for sharing it.

As someone who is trying to learn Java, this is much appreciated.
(If this comment was disrespectful, please report it.)

 
3/4/2003 8:29:17 AM

I am a real beginer and I haven't found the proper way to make the first example work on the browser, where the sample code goes in the web page code, and should I have any other software installed. Thanks in adavance
(If this comment was disrespectful, please report it.)

 
3/4/2003 4:14:48 PMŠonny Nadolny

In the code directory, go to whitchever example you like (they're numbered 1 through 9 for part 1 and 1 through 5 for part two, plus they're titled), then go to the folder, then run the html file. I have one made for each example. BTW, please vote for my code if you liked it.
(If this comment was disrespectful, please report it.)

 
3/11/2003 12:43:02 AMgww

Good Tutorial
(If this comment was disrespectful, please report it.)

 
3/11/2003 8:01:10 PM

10 minutes to sucess.
Good job!
(If this comment was disrespectful, please report it.)

 
3/13/2003 10:30:30 AM

3 snaps, a circle and 5 Globes for this tutorial mate, keep up the good work
(If this comment was disrespectful, please report it.)

 
4/21/2003 11:05:22 PMKenny gan

Friend!!!
i am kenny Gan from Malaysia. Ur tutorial really is helpful. u are my god lah. really want to say thank you for u. i am a beginning for java. yesterday i already done the part 1, to day study part 2. i also cannot imaging i can study java so easy and so clear with ur tutorial. want to say 1000 thansk you for u. as i know the tutorial only teach in Applet only right? if we want to make all the Button,Text,Checkbox in Application how ? can teach.??? thanks....
(If this comment was disrespectful, please report it.)

 
7/29/2003 1:13:05 AM

Great tutorial ! more ! more !
(If this comment was disrespectful, please report it.)

 
11/20/2003 8:03:01 AMMaxAndrews

thank you!
thank you!
thank you!
(If this comment was disrespectful, please report it.)

 
12/14/2003 10:07:51 AM

Please, more examples using different layouts on a single gui
(If this comment was disrespectful, please report it.)

 
12/16/2003 8:29:41 PM

Freaken sweet....5 globes for you
(If this comment was disrespectful, please report it.)

 
3/5/2004 8:19:23 AM

great tutorial
could grasp it even faster than reading
from books
thanks
(If this comment was disrespectful, please report it.)

 
4/3/2004 6:32:32 PM

Excelente...muy completo y conciso...
(If this comment was disrespectful, please report it.)

 
11/2/2004 11:45:06 PM

nice tutorial, this helped me a lot
(If this comment was disrespectful, please report it.)

 
9/26/2005 7:29:16 AMNexus

Only applicable for begginers, but sufficient otherwise..g00d work.
(If this comment was disrespectful, please report it.)

 
9/14/2007 2:19:06 PMNitant Soni

Wow, all i have to say is - you ROCK! I needed a quick crash course on basic GUI, and after reading a huge chapter on this stuff in a book and not understanding anything, i came here..... Absolutely amazing tutorial, so clear and simple, taught me all i needed to know in a span of 10 minutes!Way to go!

(If this comment was disrespectful, please report it.)

 
9/14/2007 2:24:03 PMNitant Soni

I was in need of a quick crash course through the basics of GUI - i tried reading a book i had, but it was way too confusing..
I searched on the net and found this - What i couldnt understand after reading 100's of pages spending hours of time, you explained in 10 minutes! Absolutely BRILLIANT tutorial, so very simple and easy to understand!

(If this comment was disrespectful, please report it.)

 
1/5/2008 7:47:09 AMshmish111

This was an excellent SECOND step for me. I have done tutorials on non GUI Java basics. I think if I hadn't, I wouldn't have understood what was going on at all. I gave it 4 starts. Thanks, now I have to find an equally good third step. :)
(If this comment was disrespectful, please report it.)

 
10/1/2009 10:22:07 AM

Thanks a lot for you contribution
(If this comment was disrespectful, please report it.)

 
6/3/2011 11:54:35 PMPrem Nath Das

ok
(If this comment was disrespectful, please report it.)

 
8/4/2011 10:19:41 PMxilent

Nice article..thank you!
(If this comment was disrespectful, please report it.)

 
9/13/2011 7:36:23 AMMuyiwa

Thanks a lot for this, your sleepless nights were not in vain
(If this comment was disrespectful, please report it.)

 
8/12/2012 12:15:34 PMAbel Anojan

Awesome bro ! , Thanks for published
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular article, please click here instead.)
 

To post feedback, first please login.