Learn Java Tutorial 1.35- JCheckBox isSelected();

preview_player
Показать описание
In this beginner Java tutorial we will learn how to read whether a checkbox is check or unchecked when we need to. The method that we will use on our JCheckBox is called isSelected(), which will return a true or false statement. In this video we will also go through some problem solving to get the checkbox to work the way we want it to.

Hit us up on G+, facebook, or twitter!

Follow us!
-------------
-------------

------------

Рекомендации по теме
Комментарии
Автор

This is so funny. I stopped the tutorial to see if I could do this all on my own and I went through the exact process that you demonstrated. First I wondered why it wasn't working, and realized that it's only asking if the boxes are selected during startup. After a little hassle I realized I needed to define those variables publicly to make it work everywhere. Then realized I was adding to my string so I had to clear it each time.

bobbycathey
Автор

Please keep the errors, we like seeing how u fix them!!! Great tutorials. You make things simple, so much better to learn. Also keep using crazy examples like farm and crops etc. HELPS ALOT

rafael
Автор

Thanks for all the Tutorials MBB. I'm a Junior in highschool and am going to be going to collage for either computer sciences or computer engineering. Either way Programming is going to help. I'm taking a Java class at my highschool, and I watched some of you'r tutorials last year. Now I'm way ahead of the class. Also, you're a better teacher than both the computer science teachers at my school. A+ job.

RegaCaska
Автор

I just love your analogies on every topic that kinda tricky and hard to understand.  

jaimedomingoalopez
Автор

I understand but- it was defined in Solar system and then when you used it on Earth (moved the ifs inside the action listener) and not the solar system you solved the problem by defining it in the galaxy (Milky way/ outside the constructor).

BTW- great job, thanks!

NoamNoLast
Автор

@mybringback Oh you moved it out side of those brackets. Didn't see that. Would probably be simpler to see for me if you moved it outside to the "solarsystem". But my mistake.

I just assumed I knew what was causing a problem.

Thanks.

xCAFEFD
Автор

how do you put the image in the JOptionPane when you click button1? I'm doing my home work in Java and i have to put an image to it, thanks :)

desireelaurente
Автор

i didn't understand 5:53 ... what is modified when you cut the s = "..." ?

VladBatrinu
Автор

@SnoweyMan111 each pair of brackets are its own world. for example, public class SolarSystem{ mercury{ } Venus{ } Earth{ Person SnoweyMan111 = new Person(); } Mars{ } } None of the other planets will know who SnoweyMan111 is, because it is only defined on Earth. But if we said that Person SnoweyMan111 is defined in the Solar System, all the other planets would be familiar with you. Does that make sense?!?!

mybringback
Автор

kind of like a global variable in c++?

VladBatrinu
Автор

i think i got it ... if s = "Good job kid ..." is defined in the b1.addActionListener(new ActionListener() { }, everytime i press button 1 s is reinitialized to "Godd job kid ... ", else s = "Good job kid ... " remembers the past actions and keeps the past text.

VladBatrinu
Автор

I don't understand what the 4:18 step did. Why can't you define them and construct them on the same line and have it work?

xCAFEFD
Автор

Really love the video editing you have made. Seeing you typing text doesn't really help anyone. Just don't bother if it's too much of a hazzle.

xCAFEFD
Автор

Well, to me, Typing with him works better than to keep pausing the video each time he types.!

MaximizedNOVA
Автор

can you please explain once again the difference between 5:51 and 6:02 ?

VladBatrinu
Автор

@mybringback Sorry, youtube reformatted it, but hopefully you can understand what I mean.

mybringback
Автор

my string is still not resetting.... besides the brackets my reset is the last thing :/ any body have any thoughts?

garrettwebster
Автор

Can this coding use in Eclipse?Cause i using Eclipse to do my project.

sugarcandy
Автор

When I try to use /n it always shows up in my official text, can you help?

sivyx
Автор

Nice video, but I don't love bacon, I'm vegetarian lol.

greatings from brazil.

IgrwOw
join shbcf.ru