stopwatch GUI app in java by using netbeans
Вставка
- Опубліковано 9 лис 2024
- welcome to coding time.
This is a step by step video tutorial to which will guide you to develop a stopwatch GUI app in java by using swing API and netbeans IDE.
To develop this stopwatch i have used swing API in java and also used threading.
if you have liked this video then hit the like button ,
and to get updates of my videos subscribe my channel.
your suggestions are always welcome...and will be precious for me .
comment in the comment section to give me your precious suggestion.
This video helped me a lot!! Thanks so much!!!!
What imports did you use? It’s says build complete but no GUI shows up.
tip: since state is boolean when writing the if condition you can just write state instead of state==true
I appreciate the video but it could be improved A LOT by giving your labels/buttons proper variable names. The first bit of code you start typing I don't know what you are doing because you are using the default name. Naming conventions are the #1 priority in programming.
very helpful good job sir
Thanks for this video
my time moves too slow, it takes it almost 3 seconds to move 1 second
same here, 2sec for 1 real sec, Im guessing its because of lag from netbeans or our computers and not an actual error in the code but idk how to fix it
hello. the gui was built but it doesn't work.
milliseconds.setText( " : " + milliseconds) has an error. i don't know why.
please help
👏👍 awesome
what does sleep(1) do here? It pauses the thread but why is this necessary?
Awesome
it's working perfectly
I am glad it helped 😊
Don't forget to subscribe and share my channel to get more Programming Tutorials. I am working hard to produce some awesome programming tutorials and every appreciation will help and motivate me.
@@codingtime4518 May I please have the source code?
Thanks for the video but why we use "public void/public static void/private void"? What are their functions? Can you please tell me in a simple language, they really makes me confused.
Thanks
Hi..the difference between public void and puclic static void is that if you are using public static void then you don't need to call that function by using any object it will be called automatically..wherease to call function public void() you need to use the object of the class in which the function is declared..
I hope it can help you to understand that...
If you haven't subscribed to my channel yet then please subscribe and share with your freinds so they can also get such useful programming tutorials..
I am working really hard to produce some awesome programming tutorials...and i need all of your support so please give your support by subscribing to our channel..
Thanks
@@codingtime4518 thanks , but what is call function? I can search it on Google but it will not give appropriate answer which I can understand
@@spaceboy8933 Calling a function
Suppose you are making a method other than your main method for the simplicity of programming. To make that method run you need to call that method from the main function.
Calling a Function is like Teleportation.You call that method and it does the work you intend to do through that method. On calling, You are teleported from the main method to the other method which is then executed.
For Example:(Su[ppose it is the class named Xyz
public static void main(String args[]){
System.out.println("hello");
Xyz obj = new Xyz();
obj.Print();
}
public void Print(){
System.out.println("UA-cam");
}
These 2 lines call the method Print:
Xyz obj = new Xyz();
obj.Print();
In the First Line you make an object and allocate memory space(using the new Keyword).
the Second Line actually calls the function
Now to the Question:
This is the technique of calling non-static function which is print;
Now if You replace
public void Print()
with
public static void Print()
You will need only one line for calling the Function Print
i.e.
Print();
Thus you do not need to declare an object like "obj"
Thnx.Hope this Helps
bro this code is sooo coooll and easy to understand !! :) but pls add background music in your video because some videos take long time that video we r watching then soooo booooring :(:(:( pls add some music Tq :) bro
Thank you so much bro for your appreciation. This really motivates me to create more awesome programming tutorials to help brothers like you.
Thanks for the suggestion I will surely Look upon it.
And don't forget to subscribe to our channel and also share our channel with your friends also and ask them to subscribe because I need more and more subscriber to make this channel establised and to help other students in programming.
Thanks
It works fine on me. Thnx!
merci
There is problem with
setText
eror: int cannot be dereferenced
its millisecond.setText (and not milliseconds ) where millisecond is the name of the fourth label
i had to change the Thread t at 3:50 by new Thread(new Runnable() {...}).start()
After compiling the output bar shows "run:
BUILD SUCCESSFUL (total time: 0 seconds)"
but it's not showing stopwatch.Please need help
Same problem. Any luck on this?
@@omphilemosingathi8963 same problem.. have you find its solution? if yes, help me then!
@@starlight5531 I will check on my old projects. I think I did manage to fix it.
@@starlight5531 it runs well on Netbeans IDE 8.2. I also had a problem running it on a Netbeans IDE later than 8.2
Just Run File
thanks brooooooooo!!!!!!!!!!!!!!!!!!!!!!
Juwel Ahmed I'm glad that you like that. don't forget to subscribe to my channel to get more programming tutorials.
😢🎉
in my program stop button didnt work...what can i do?
bro please do same program in eclipse ide
How can I contact with you
Thnx bro👍👍👍👍
Thanks for the appreciation 😊
Don't forget to subscribe and share my channel to get more useful programming tutorials.
Thank you brother ,very useful totoriaaaaalllll,and I want to say plz see my comment ))))))
Muradov Murad hi brother 😊
I am glad you liked this video..My only aim is to help brothers like you..
Getting appreciation from you is something very special for me..
Best of luck for your future...I hope you will become a good programmer...
Feel free to reach me out whenever you need any help in programming I will try my best to help you.
And don't forget to subscribe to my channel to get more programming tutorials.
It did not run when I try it, the design did not show up. Please help me
why the awt is still in red how to fix this?
1 real minute is 48 sec in your code, wrong code. // import java.util.concurrent.TimeUnit; TimeUnit.SECONDS.sleep(1);
Can you please share the code ❤
hello can i get the complete code for the stopwatch please
yeah..you can contact me at noman.232626@gmail.com for the source code..
@@codingtime4518 hi can i ask for the source code?
codingan for html is there?
send to my email emmopurnomo@gmail.com
thank you, I'm waiting
i have done the program. and i the program was ok but they are not showing the design i mean the stop watch
did you "setVisible(true)"?
@@Sabotronics yes
I have emailed you regarding source code for this...kindly check and please provide me the same
I tried the code but don´t go as well as a clock, how can I solve that?
Eddy Torres you can use System.currentTimeMillis(). This will solve your problem. If this suggestion works for you and you want to get more programming Tutorial then don't forget to subscribe my channel to get more programming Tutorial.
the time move slow for me
I wrote the code but its giving a run time error......pls...help
you can send your code at noman.232626@gmail.com. and after seeing the code i can help you.
i am always here to help you just send your code at my email and i will definitely help you. and don't forget to subscribe to my channel to get more programming tutorials.
@@codingtime4518 I just sent my code. I am having error in it can you help me?..In gmail
this is where i get an error " millisecond.setText(" : " + milliseconds);
Oyelayo Olaolu can you show me the error message that what error message is printing on your screen ?
yes me too but it works you just try to check the first letters if it upper or lower
help me
error errorrrr
why i get an error millisecond.setText();
in this line? anybody help me
I'm noob
thanks for your video