Java Video Tutorial 20

preview_player
Показать описание


I introduce you to Graphical User Interfaces (GUI) in this part of my Java Video Tutorial. I focus specifically on Java Swing and its components.

We figure out how to display frames, panels, labels, buttons, text areas and more. I also go over the Dimension object and the Java Toolkit, which allows you to ask questions of the operating system.
Рекомендации по теме
Комментарии
Автор

I'm extremely impressed that so many people can watch these videos and consume so much information. These videos were made to watch with the code in front of them for analysis. It is amazing to me that so many people can just sit and consume everything. You guys are quite amazing :)

derekbanas
Автор

Hi Derek,

I am an old school programmer(Cobol, RPG, CLP etcetera) and I have worked on IBM iSeries my whole life. Nowadays there just isn't enough work for me anymore so about two weeks ago I decided to seriously study Java and get a new direction for my career.

It is not easy to find proper free tutorials that are actually any good on the web. They tend to oversimplify or actually assume to much knowledge. I have been finding my way and I understand the basics of Java now, but my problem is/was, that I want to test myself by writing an interactive Frame-based application that retrieves and updates the MySql database information that I have created. That means knowing about SQL-usage in Java, about using Swing in Java, etcetera.

I have just watched this video(Lesson #20) and I am very happy with it. It explains designing frames at such a basic level that I can compare it to my experience with RPG and Display files on the iSeries. Baby steps are what I need and that is what I got from your video. I user Ecllipse by the way, so that makes it easier to follow your instructions. I would advise anyone to go with Eclipse, haven't seen anything that it cannot do so far.

Thank you very much for your efforts. If the next videos are just as good I will watch them diligently and learn much faster than if I would just read the manuals.

Programming in Java turns out to be great fun! ;)

Rob.

RobBaartwijk
Автор

Thank you :) I just do it because I enjoy it. For me, helping people all over the world is more gratifying then making money in a classroom. I'm very happy that you like the videos

derekbanas
Автор

The benefit of using jframe is that you gain access to the methods of the jframe class. That is why we extend jframe

derekbanas
Автор

My best answer is that you should think about that right now. I explain the differences between interfaces and abstract classes later on in tutorials that are pretty much devoted just to that topic. Basically you wouldn't implement JFrame because you want access to methods in the JFrame. If you implement a class you can't gain access to real methods. Interfaces are used to implement advanced techniques. Look at the beginning of my design patterns tutorial for a better explanation.

derekbanas
Автор

Yes you are correct. LessonTwenty extends JFrame turns LessonTwenty into a JFrame. And, any reference to this inside of a class is a reference to the object you are using. I hope that helps

derekbanas
Автор

Yes you are correct. Always feel free to ask questions. You caught me during a time in which I wasn't near a computer. I'm glad you enjoyed it :)

derekbanas
Автор

@ezimerman Both are very useful. I focus on Swing only because it is more popular

derekbanas
Автор

I used to do that when I first got minecraft. After I made guns and a bunch of new enemies I stopped. I never had the patience to make the wonderful mods that the big guys made. I like making my own goofy games more. It will be fun to show them when I get into game development tutorials

derekbanas
Автор

The quick answer is that Frame is part of the old awt gui framework and JFrame is part of the newer swing framework. You should use JFrame

derekbanas
Автор

This is a reference to a field or method for the currently used object of the class. It is just like if you we're part of a class named person. If you wanted to refer to your computer you'd say this is my computer. Does that help?

derekbanas
Автор

You're welcome. The next part will be up either tomorrow or the next day

derekbanas
Автор

You're very welcome :) You may find that the first 2 videos in my design patterns tutorial will help you better understand OOP. The same is true with the first 2 videos in my Object Oriented Design tutorial.

derekbanas
Автор

@supprof1 You're welcome. I've been putting articles on my website. I'll be making videos more consistently now

derekbanas
Автор

Thanks for the input. I've been trying to figure out the best way to title videos

derekbanas
Автор

@TheDebare Thanks! A big one on GUI event handling is going up tomorrow

derekbanas
Автор

You should do whatever you are most comfortable with. I prefer to put the curly brackets right after the method definition, but that is just an opinion.

derekbanas
Автор

WOW, I didn't know we would make an actual GUI this fast! This is so epic!

TheWombatGuru
Автор

@jasononcejason If you click on the view source button in the upper right corner the numbers go away. Sorry, but that has been the best code plugin I've found

derekbanas
Автор

At the end of this tutorial series I show how to make asteroids. I cover enough that you'll be able to make numerous other games with that information.

derekbanas