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.

КОМЕНТАРІ • 72

  • @enzosantos4247
    @enzosantos4247 Рік тому

    This video helped me a lot!! Thanks so much!!!!

  • @NadineLynch10
    @NadineLynch10 3 роки тому +2

    What imports did you use? It’s says build complete but no GUI shows up.

  • @tlr9403
    @tlr9403 4 роки тому +2

    tip: since state is boolean when writing the if condition you can just write state instead of state==true

  • @tomparkie866
    @tomparkie866 5 років тому +2

    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.

  • @atozlearningpoint1092
    @atozlearningpoint1092 5 років тому

    very helpful good job sir

  • @tomaslopez9999
    @tomaslopez9999 4 роки тому

    Thanks for this video

  • @roostingbenen4591
    @roostingbenen4591 5 років тому +7

    my time moves too slow, it takes it almost 3 seconds to move 1 second

    • @sachista
      @sachista 3 роки тому +1

      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

  • @itumonokoane5026
    @itumonokoane5026 2 роки тому +1

    hello. the gui was built but it doesn't work.
    milliseconds.setText( " : " + milliseconds) has an error. i don't know why.
    please help

  • @AdnanKhan-sw3nl
    @AdnanKhan-sw3nl 5 років тому

    👏👍 awesome

  • @wheeup
    @wheeup 4 роки тому

    what does sleep(1) do here? It pauses the thread but why is this necessary?

  • @akanksha4505
    @akanksha4505 6 років тому

    Awesome
    it's working perfectly

    • @codingtime4518
      @codingtime4518  6 років тому

      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.

    • @omphilemosingathi8963
      @omphilemosingathi8963 2 роки тому

      @@codingtime4518 May I please have the source code?

  • @spaceboy8933
    @spaceboy8933 5 років тому +1

    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

    • @codingtime4518
      @codingtime4518  5 років тому +1

      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

    • @spaceboy8933
      @spaceboy8933 5 років тому +1

      @@codingtime4518 thanks , but what is call function? I can search it on Google but it will not give appropriate answer which I can understand

    • @lolcatfiglet
      @lolcatfiglet 5 років тому +1

      @@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

  • @yuvi_white_hat1942
    @yuvi_white_hat1942 6 років тому +1

    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

    • @codingtime4518
      @codingtime4518  6 років тому

      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

  • @alyssalynguo4271
    @alyssalynguo4271 4 роки тому

    It works fine on me. Thnx!

  • @ryhemessid1842
    @ryhemessid1842 3 роки тому

    merci

  • @yemenfalcon7919
    @yemenfalcon7919 6 років тому +4

    There is problem with
    setText
    eror: int cannot be dereferenced

    • @yannickdegratie972
      @yannickdegratie972 5 років тому +2

      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()

  • @izzfhd_70-16
    @izzfhd_70-16 4 роки тому +1

    After compiling the output bar shows "run:
    BUILD SUCCESSFUL (total time: 0 seconds)"
    but it's not showing stopwatch.Please need help

    • @omphilemosingathi8963
      @omphilemosingathi8963 2 роки тому

      Same problem. Any luck on this?

    • @starlight5531
      @starlight5531 2 роки тому

      @@omphilemosingathi8963 same problem.. have you find its solution? if yes, help me then!

    • @omphilemosingathi8963
      @omphilemosingathi8963 2 роки тому

      @@starlight5531 I will check on my old projects. I think I did manage to fix it.

    • @omphilemosingathi8963
      @omphilemosingathi8963 2 роки тому

      @@starlight5531 it runs well on Netbeans IDE 8.2. I also had a problem running it on a Netbeans IDE later than 8.2

    • @daveoperiano7303
      @daveoperiano7303 Рік тому

      Just Run File

  • @juwelahmed7587
    @juwelahmed7587 6 років тому +1

    thanks brooooooooo!!!!!!!!!!!!!!!!!!!!!!

    • @codingtime4518
      @codingtime4518  6 років тому

      Juwel Ahmed I'm glad that you like that. don't forget to subscribe to my channel to get more programming tutorials.

  • @javaallanjavadesigners2862
    @javaallanjavadesigners2862 4 місяці тому

    😢🎉

  • @nowshad5429
    @nowshad5429 4 роки тому

    in my program stop button didnt work...what can i do?

  • @ajays7173
    @ajays7173 4 роки тому

    bro please do same program in eclipse ide

  • @masooma_official9127
    @masooma_official9127 3 роки тому

    How can I contact with you

  • @erkumarraushan7857
    @erkumarraushan7857 6 років тому

    Thnx bro👍👍👍👍

    • @codingtime4518
      @codingtime4518  6 років тому

      Thanks for the appreciation 😊
      Don't forget to subscribe and share my channel to get more useful programming tutorials.

  • @filmhatalar7019
    @filmhatalar7019 6 років тому

    Thank you brother ,very useful totoriaaaaalllll,and I want to say plz see my comment ))))))

    • @codingtime4518
      @codingtime4518  6 років тому

      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.

  • @jeannyvillahermosa6160
    @jeannyvillahermosa6160 3 роки тому

    It did not run when I try it, the design did not show up. Please help me

  • @Cookieya3y
    @Cookieya3y Рік тому

    why the awt is still in red how to fix this?

  • @webaruhazberles
    @webaruhazberles 4 роки тому +1

    1 real minute is 48 sec in your code, wrong code. // import java.util.concurrent.TimeUnit; TimeUnit.SECONDS.sleep(1);

  • @luciamdunusana
    @luciamdunusana Рік тому

    Can you please share the code ❤

  • @susreejadiddi2529
    @susreejadiddi2529 5 років тому +1

    hello can i get the complete code for the stopwatch please

    • @codingtime4518
      @codingtime4518  5 років тому

      yeah..you can contact me at noman.232626@gmail.com for the source code..

    • @jeffwackyb.miranda4415
      @jeffwackyb.miranda4415 4 роки тому

      @@codingtime4518 hi can i ask for the source code?

  • @duniaengineerbuilding6013
    @duniaengineerbuilding6013 6 років тому

    codingan for html is there?

  • @rakibhasanchowdhury868
    @rakibhasanchowdhury868 5 років тому

    i have done the program. and i the program was ok but they are not showing the design i mean the stop watch

  • @Onlywhatpeoplelike
    @Onlywhatpeoplelike 2 роки тому

    I have emailed you regarding source code for this...kindly check and please provide me the same

  • @eddytorres8125
    @eddytorres8125 6 років тому +1

    I tried the code but don´t go as well as a clock, how can I solve that?

    • @codingtime4518
      @codingtime4518  6 років тому

      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.

  • @meedman4960
    @meedman4960 5 років тому

    the time move slow for me

  • @hammeshnimbark3772
    @hammeshnimbark3772 6 років тому

    I wrote the code but its giving a run time error......pls...help

    • @codingtime4518
      @codingtime4518  6 років тому

      you can send your code at noman.232626@gmail.com. and after seeing the code i can help you.

    • @codingtime4518
      @codingtime4518  6 років тому

      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.

    • @nischalvooda886
      @nischalvooda886 4 роки тому

      @@codingtime4518 I just sent my code. I am having error in it can you help me?..In gmail

  • @oyelayoolaolu3313
    @oyelayoolaolu3313 6 років тому

    this is where i get an error " millisecond.setText(" : " + milliseconds);

    • @codingtime4518
      @codingtime4518  6 років тому

      Oyelayo Olaolu can you show me the error message that what error message is printing on your screen ?

    • @meedman4960
      @meedman4960 5 років тому

      yes me too but it works you just try to check the first letters if it upper or lower

  • @aishatonabi146
    @aishatonabi146 5 років тому

    help me
    error errorrrr

  • @mushfiqulislam21
    @mushfiqulislam21 3 роки тому

    why i get an error millisecond.setText();
    in this line? anybody help me

  • @lorenzodossi
    @lorenzodossi 5 років тому

    I'm noob

  • @surya_aditia
    @surya_aditia 4 роки тому

    thanks for your video