Java 2D animation 🎞️

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ก.ย. 2024
  • Java animation tutorial 2D GUI swing beginners
    #Java #animation #tutorial #2D #GUI #swing #beginners

ความคิดเห็น • 164

  • @BroCodez
    @BroCodez  4 ปีที่แล้ว +100

    //------------------------------------------------
    public class Main{
    public static void main(String[] args) {

    new MyFrame();

    }
    }
    //------------------------------------------------
    import java.awt.*;
    import javax.swing.*;
    public class MyFrame extends JFrame{

    MyPanel panel;

    MyFrame(){

    panel = new MyPanel();

    this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    this.add(panel);
    this.pack();
    this.setLocationRelativeTo(null);
    this.setVisible(true);
    }
    }
    //------------------------------------------------
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class MyPanel extends JPanel implements ActionListener{
    final int PANEL_WIDTH = 500;
    final int PANEL_HEIGHT = 500;
    Image enemy;
    //Image backgroundImage;
    Timer timer;
    int xVelocity = 1;
    int yVelocity = 1;
    int x = 0;
    int y = 0;

    MyPanel(){
    this.setPreferredSize(new Dimension(PANEL_WIDTH,PANEL_HEIGHT));
    this.setBackground(Color.black);
    enemy = new ImageIcon("enemy.png").getImage();
    //backgroundImage = new ImageIcon("space.png").getImage();
    timer = new Timer(10, this);
    timer.start();
    }
    public void paint(Graphics g) {

    super.paint(g); // paint background

    Graphics2D g2D = (Graphics2D) g;

    //g2D.drawImage(backgroundImage, 0, 0, null);
    g2D.drawImage(enemy, x, y, null);
    }

    @Override
    public void actionPerformed(ActionEvent e) {

    if(x>=PANEL_WIDTH-enemy.getWidth(null) || x=PANEL_HEIGHT-enemy.getHeight(null) || y

    • @dgh25
      @dgh25 2 ปีที่แล้ว +1

      thx

    • @shubhammusale692
      @shubhammusale692 2 ปีที่แล้ว +1

      Awesome

    • @17rajmandal14
      @17rajmandal14 ปีที่แล้ว

      Nice

    • @stakemograine266
      @stakemograine266 ปีที่แล้ว

      I think it is worth paying attention to the fact that the method
      public void paint(Graphics g) in MyPanel class should be declared as:
      @Override
      public void paint(Graphics g)

    • @joyceasante8292
      @joyceasante8292 ปีที่แล้ว

      Practicing...
      public class Main
      {
      public static void main (String[]args)
      {
      new MyFrame ();
      }
      }
      ******************
      import java.awt.*;
      import javax.swing.*;
      public class MyFrame extends JFrame
      {
      MyPanel panel;
      MyFrame ()
      {
      panel = new MyPanel ();
      this.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
      this.add (panel);
      this.pack ();
      this.setLocationRelativeTo (null);
      this.setVisible (true);
      }
      }
      ******************
      import java.awt.*;
      import java.awt.event.*;
      import javax.swing.*;
      public class MyPanel extends JPanel implements ActionListener
      {
      final int PANEL_WIDTH = 250;
      final int PANEL_HEIGHT = 250;
      Image avatar;
      Image backgroundImage;
      Timer timer;
      int xVelocity = 2;
      int yVelocity = 1;
      int x = 0;
      int y = 0;
      MyPanel ()
      {
      this.setPreferredSize (new Dimension (PANEL_WIDTH, PANEL_HEIGHT));
      this.setBackground (Color.black);
      avatar = new ImageIcon ("avatar.png").getImage ();
      backgroundImage = new ImageIcon("sea.png").getImage();
      timer = new Timer (20, this);
      timer.start ();
      }
      public void paint (Graphics g)
      {
      super.paint (g);
      Graphics2D g2D = (Graphics2D) g;
      g2D.drawImage(backgroundImage,0,0,null);
      g2D.drawImage (avatar, x, y, null);
      }
      @Override public void actionPerformed (ActionEvent e)
      {
      if (x >= PANEL_WIDTH - avatar.getWidth (null) || x > 0)
      {
      xVelocity = xVelocity * -1;
      }
      x = x + xVelocity;
      if (y >= PANEL_HEIGHT - avatar.getHeight (null) || y > 0)
      {
      yVelocity = yVelocity * -1;
      }
      y = y + yVelocity;
      repaint ();
      }
      }

  • @ljront3126
    @ljront3126 3 หลายเดือนก่อน +1

    I like your explanations. You are simplifying one main method of designing in Java, which helps to many beginners by programing. One High point for you bro👍

  • @niratomata
    @niratomata 3 ปีที่แล้ว +12

    the satisfying moment when the alien perfectly hits the corner of the screen

  • @mypythonplace
    @mypythonplace ปีที่แล้ว +6

    Simple the best programming videos! 100% Certain! Thank you Bro Code!, I have learned more with YOU with a few videos than with many programming books combined! You always Straight to the point, total knowledge, and nice manners for teaching!

  • @pavelkvasnicka6856
    @pavelkvasnicka6856 ปีที่แล้ว +2

    This is the best Java tutorial for beginners, so you can learn Java and English in one hit. Please keep going! I vote for Java advance tutorial. Thanks a lot Bro

  • @seabass6106
    @seabass6106 4 ปีที่แล้ว +5

    LOUD & CLEAR! THANKS BRO

    • @BroCodez
      @BroCodez  4 ปีที่แล้ว +1

      thanks for watching Oberdorfer

  • @user-et3sj6xt4p
    @user-et3sj6xt4p 10 หลายเดือนก่อน +1

    The constructor Timer(10, this) is undefined
    The method start() is undefined for the type Timer

    • @DorinCurnic
      @DorinCurnic 8 หลายเดือนก่อน +1

      verify if you add correct import 'java.awt.event.*;' and 'implements ActionListener'

  • @micahdavis1369
    @micahdavis1369 9 หลายเดือนก่อน +1

    I just needed to learn how to animate a line moving in a circle but this helped!

  • @naikels6922
    @naikels6922 7 หลายเดือนก่อน

    you got me when you said "I hate awkward silences" XD

  • @pleasedontwatchthese9593
    @pleasedontwatchthese9593 ปีที่แล้ว

    Thank you for this. This video got to the point fast and the script is small and just what I need.

  • @ZeNItSu-w9t
    @ZeNItSu-w9t 2 หลายเดือนก่อน +1

    How do we get the icons for the project? I've been searching far and wide and I can't seem to find one that works for the code 😭 🙏

  • @holohien9115
    @holohien9115 3 ปีที่แล้ว

    I am very happy for the video, it allowed me to understand enough things. Thanks again!

  • @cate01a
    @cate01a 3 ปีที่แล้ว +8

    very helpful as always!
    could I ask you cover rotating images/icons in future videos? tried various methods for the past hour, and I don't know how to implement any of the methods I came across

    • @BroCodez
      @BroCodez  3 ปีที่แล้ว +6

      that's not a bad idea

    • @tvt-Ar
      @tvt-Ar 2 ปีที่แล้ว +1

      @@BroCodez how to remove white background from image just like in your case enemy image doesn't have any background

  • @alexandrevinicius2960
    @alexandrevinicius2960 3 หลายเดือนก่อน

    that's so sick!

  • @shaynazoedeguzman7418
    @shaynazoedeguzman7418 2 ปีที่แล้ว

    Awesome. Marvelous. Splended. Thank you very much bro code!

  • @tryme5275
    @tryme5275 10 หลายเดือนก่อน +1

    Hi bro I'm having issues with when im creating a timer I also implemented the actionlistener and import the timer
    Timer timer;
    timer = new Timer(1000, this);
    It says it is undefined

  • @accumulator4825
    @accumulator4825 2 ปีที่แล้ว

    Thanks dude, really needed this!

  • @carriejiang1570
    @carriejiang1570 2 ปีที่แล้ว +1

    Excited to watch!!!!!!!!!!

  • @noisyguest5249
    @noisyguest5249 4 ปีที่แล้ว +7

    My notification is broken, the notification came 23secs ago and bro code's comment was 17hr ago wth

    • @rewrose2838
      @rewrose2838 4 ปีที่แล้ว +2

      He probably unlisted/made the video private when uploading 17 hours ago and only now made it public

    • @BroCodez
      @BroCodez  4 ปีที่แล้ว +3

      I scheduled the video for release at a certain time

  • @SorryDaSlayer
    @SorryDaSlayer 3 ปีที่แล้ว

    Dude after 12 fucking long hours.. Thank you so much!!

  • @DanielRodrigues-bx6lr
    @DanielRodrigues-bx6lr 3 ปีที่แล้ว +6

    Is there any way to keep the animation panel in the background? For example, I want to have clickable labels (via mouse listeners) and buttons over the animation. I tried that, but the animation panel ends up completely covering everything else.

    • @Blackilykat
      @Blackilykat 2 ปีที่แล้ว +2

      you should probably use two different layeredPanes one for the animation and one for the buttons and labels. Here's the video about layered panes: th-cam.com/video/CmK1nObLxiw/w-d-xo.html

  • @jpiongchuanho3422
    @jpiongchuanho3422 4 ปีที่แล้ว +5

    I'm facing a problem ,when i write
    timer = new Timer(1000,null);
    timer.start();
    The constructor Timer(int,null)is undefined
    The method start()is undefined for the type timer

    • @BroCodez
      @BroCodez  4 ปีที่แล้ว +4

      replace timer = new Timer(1000,null);
      with
      timer = new Timer(1000,this);

    • @jpiongchuanho3422
      @jpiongchuanho3422 4 ปีที่แล้ว +14

      @@BroCodez I found the source of the problem,import wrong.
      import java.util.Timer;
      change to import javax.swing.Timer;
      Thank you for your patience reply

    • @adrianrodriguez80
      @adrianrodriguez80 2 ปีที่แล้ว

      @@jpiongchuanho3422 thanks! :D

  • @wangobaloch2553
    @wangobaloch2553 3 ปีที่แล้ว +2

    Thanks! Doing a great job
    Can you provide the link where u download the images

  • @nawfalnjm5699
    @nawfalnjm5699 3 ปีที่แล้ว +1

    thank you . this is very helpful and easy to understand.

  • @Pymmusic
    @Pymmusic ปีที่แล้ว

    Thank you very much for this tutorial. I need it for one little program that i hope to write in the next days. I will write the URL of this video if i will be successful in my project.
    You have the great gift to explain very difficult things in a very simple way.
    Thanks you again; Mr. Bro Code!!!
    Paolo Maria Guardiani

  • @schee4887
    @schee4887 9 หลายเดือนก่อน

    How do you get all of your images to be perfectly for the panel, did you manually change it for the panel or do something special?

  • @Rohan-Prabhala
    @Rohan-Prabhala ปีที่แล้ว

    Hey bro, love your tutorials, and love your channel! You're so good, everybody of all ages can learn from you! I just have on question (not related to your video, nor teaching skills).
    I Want to make a trail that follows the enemy and makes a path of it, but how would I do that? I'm tried making a line, but I'm having trouble making it follow behind the character, and I'm having trouble making the previous lines stay, as the background (I think) keeps painting over it!
    Also, is there a way to clone the enemy, like multiple new instances of it, maybe to make a game like space invaders with it?

  • @najmulislam9658
    @najmulislam9658 3 ปีที่แล้ว

    You are My Hero bro....

  • @discreet_boson
    @discreet_boson 4 ปีที่แล้ว +1

    This is awesome

  • @jfruit6310
    @jfruit6310 4 ปีที่แล้ว +3

    interesting that there are more than one Timer class from Java one from swing and i found another from util. i just know because code doesn't work when i import wrong package lol.

    • @foreversleepy4379
      @foreversleepy4379 3 ปีที่แล้ว +1

      The Swing timer is used to perform actions on the Event Dispatch Thread after a certain delay. It's to prevent issues that multithreading can cause in regards to GUI components. The designers of Swing decided that all changes to GUI components must happen within one thread, which prevents a lot of headaches compared to changing the state of GUI components from multiple threads.
      If you are writing an app that's based on a schedule and it doesn't use GUI Swing components, then it's better to use the util Timer class for general scheduling.

    • @nawfalnjm5699
      @nawfalnjm5699 3 ปีที่แล้ว

      thank you my friend , i had this problem but now i fixed it

  • @enoselinsa9771
    @enoselinsa9771 ปีที่แล้ว

    This is exactly what i need!!!

  • @CrispenLeblanc
    @CrispenLeblanc 8 หลายเดือนก่อน

    I have a background image that is 1024x1024 but the JPanel is 500x500. The background will not display at all if I do not change the background image size to match the JPanel. Is there a way to resize the background image with code?

  • @timurelfiki
    @timurelfiki 2 ปีที่แล้ว

    Thanks really coll content!🔥🔥🔥

  • @helriskor
    @helriskor 3 ปีที่แล้ว +1

    My images wink constantly. I think it is about the 10 seconds timer and it paints constantly. I see the painting winking I think but it works correct on your computer. How can I solve this?

    • @Blackilykat
      @Blackilykat 2 ปีที่แล้ว

      I had the same issue, you might have switched position and size arguments when you drew the image

  • @cyanuranus6456
    @cyanuranus6456 ปีที่แล้ว

    I Want You To Turn This into a Software and Publish it for Windows, Microsoft and MacOS

  • @minhgiang7945
    @minhgiang7945 2 ปีที่แล้ว

    Thank you for your tutorial

  • @ayae.muhammed7305
    @ayae.muhammed7305 4 ปีที่แล้ว +2

    I loveeee it

    • @BroCodez
      @BroCodez  4 ปีที่แล้ว

      thanks for watching Aya

  • @JAGM77MX
    @JAGM77MX ปีที่แล้ว

    Outstanding!

  • @exothermic1942
    @exothermic1942 2 ปีที่แล้ว +1

    This doesn't work when I copy-pasted it into eclipse. I changed the "enemy = new ImageIcon("enemy.png).getImage();" to "enemy = new ImageIcon("grass.png").getImage();", but the image doesn't show up at all. Any suggestions?

    • @MJ_abc
      @MJ_abc 2 ปีที่แล้ว

      make sure the image has the same name as the image you have in your project folder

    • @Blackilykat
      @Blackilykat 2 ปีที่แล้ว

      add src/ in front of the image name. I don't know why but some stuff that shouldn't work works for him.

    • @Levi-Luke
      @Levi-Luke 2 ปีที่แล้ว

      Well, put the image, on the same location as whr your project file📁. For example my class files and project files within my D-drive. D:(drive name) \java(folder name) \practice(another foldername) \anime(java project name) \enemy(image)

    • @namthanh7959
      @namthanh7959 9 หลายเดือนก่อน

      @@Blackilykat you saved my day

  • @astonmargolis-dias7089
    @astonmargolis-dias7089 7 หลายเดือนก่อน

    lmaaooo siiiick haha 🔥🔥

  • @leviplays7466
    @leviplays7466 5 หลายเดือนก่อน

    you're the bro

  • @Almapeterson-f7e
    @Almapeterson-f7e 9 หลายเดือนก่อน

    These are really good videos but I can't get mine to draw any images.

  • @broderickjohnson7167
    @broderickjohnson7167 3 ปีที่แล้ว

    This will be very useful!!

  • @ARYANSINGH-ee5gx
    @ARYANSINGH-ee5gx 2 ปีที่แล้ว +1

    how that image coming on your screen

    • @Blackilykat
      @Blackilykat 2 ปีที่แล้ว +2

      make sure to add src/ in front of the image name

  • @sanskarsongara2592
    @sanskarsongara2592 3 ปีที่แล้ว +1

    Thanks, Everything works Perfect. Just wanted to know why the hell it lags af

  • @giogio3208
    @giogio3208 2 ปีที่แล้ว

    SWAG DUDE!!!!

  • @paraparasolian6484
    @paraparasolian6484 2 ปีที่แล้ว

    Nice! I tried this with xVelocity = 10 and yVelocity = 21; Excellent!!

  • @oguzhantopaloglu9442
    @oguzhantopaloglu9442 4 ปีที่แล้ว

    wow this was very useful

  • @eliasferdji7711
    @eliasferdji7711 ปีที่แล้ว

    Génial la vidéo !

  • @mahimasingh4791
    @mahimasingh4791 2 ปีที่แล้ว

    Yo bro your playlist need some changes timer vid needs to be before in the 2D animation... I don't get the velocity thing and timer thing here

  • @SeniorScriptKitty
    @SeniorScriptKitty 6 หลายเดือนก่อน

    maybe I screwed up the build path or something but its just not working I have gotten crazy errors even though its duplicate code no clue

  • @powerfullone7915
    @powerfullone7915 4 ปีที่แล้ว

    Loved it bro

    • @BroCodez
      @BroCodez  4 ปีที่แล้ว

      thanks for watching!

  • @attalaw36
    @attalaw36 3 ปีที่แล้ว

    thank you very helpful ...

  • @RyandracusChapman
    @RyandracusChapman 2 ปีที่แล้ว

    My image starts buffering and is stuck at the max x-position in my code, it's still an image, but it's unrelated to this exact code. It starts buffering at x = 900 and fiddles around that. Is there a reason why it won't start moving back towards the left?

  • @mheeprising8840
    @mheeprising8840 6 หลายเดือนก่อน

    Thank you !!!

  • @matt_acosta
    @matt_acosta ปีที่แล้ว

    Thank you!

  • @jwflammer
    @jwflammer 3 ปีที่แล้ว

    really cool

  • @hugo-garcia
    @hugo-garcia 2 ปีที่แล้ว +1

    I modified the code and made the famous DVD logo moving around

  • @maxwong1768
    @maxwong1768 2 ปีที่แล้ว +1

    I have tried to make the movement logic by my ownself . Undoubtedly , your way is much more clever and efficient .
    Code
    boolean goLeft = false , goRight = true , goUp = false , goDown = true ;
    if ((x+100) + xVelocity > panelWidth) // 100 is the image width .
    {
    goRight = false ;
    goLeft = true ;
    }
    else if (x - xVelocity < 0)
    {
    goLeft = false ;
    goRight = true ;
    }

    if (goRight)
    {
    x += xVelocity ;
    }
    else if (goLeft)
    {
    x -= xVelocity ;
    }

    if ((y+100) + yVelocity > panelHeight) // 100 is the image height .
    {
    goDown = false ;
    goUp = true ;
    }
    else if (y - yVelocity < 0)
    {
    goUp = false ;
    goDown = true ;
    }
    if (goUp)
    {
    y -= yVelocity ;
    }
    else if (goDown)
    {
    y += yVelocity ;
    }

  • @kemann3815
    @kemann3815 2 ปีที่แล้ว

    Thanks a lot!

  • @derkach7907
    @derkach7907 2 ปีที่แล้ว +1

    Nice

  • @karippaitech8963
    @karippaitech8963 ปีที่แล้ว +1

    How to increase background image size

  • @haitranngoc3381
    @haitranngoc3381 3 ปีที่แล้ว

    This is a great video, but I have a question, if I want to draw more than 1 object, but they are drawn independently on the same frame, what should I do?

    • @derkach7907
      @derkach7907 2 ปีที่แล้ว

      Just put the object code right after the other object, thats it. (you might wanna change some variables, and I don't know how to fix collision but feel free to try it)

    • @Blackilykat
      @Blackilykat 2 ปีที่แล้ว

      as long as they are both before the repaint() method they will get updated in the same frame

  • @wtf_xitiz
    @wtf_xitiz 2 ปีที่แล้ว

    Learnt new things... ( I was doing it so wrongly) 😂

  • @imperilbuster404
    @imperilbuster404 3 ปีที่แล้ว +1

    A few questions, I'm trying to get a small circle or image to travel on the edges of a diamond-shaped drawing(like a baseball home run). I was wondering how you would write it where it would reach a corner/coordinates and then have it turn to run to another corner, and then stop at the homebase? Another question is that I'm thinking of implementing a system where the user could input the speed the circle would travel in, should I have it where it change the velocity or the timer? And lastly, how would I implement a pause mechanic, such as when I pause the program and resume it?
    Your videos are really helpful btw.

    • @Blackilykat
      @Blackilykat 2 ปีที่แล้ว

      use a switch method. Put a case for every base's coordinates and for the start, and once each is reached change the velocity to make it go the right way

  • @Amin-qw3ol
    @Amin-qw3ol 3 ปีที่แล้ว

    Thanks Bro

  • @anonimanonim1223
    @anonimanonim1223 2 ปีที่แล้ว

    Great

  • @gautamsajith5544
    @gautamsajith5544 ปีที่แล้ว

    Can we implement this using labels?

  • @teowong1
    @teowong1 2 ปีที่แล้ว

    how to pass the argument into the "constructor of timer" ?

  • @johnnymccauley5923
    @johnnymccauley5923 3 ปีที่แล้ว +1

    I've copied and pasted this code, I'm using inteli J though. This first stage with displaying the images does not appear to be working?

    • @BroCodez
      @BroCodez  3 ปีที่แล้ว

      Hmmm, I would first check the folder that your image is in. Second I would check to make sure that I have the line of code to draw the image g2D.drawImage(enemy, x, y, null);

    • @johnnymccauley5923
      @johnnymccauley5923 3 ปีที่แล้ว

      @@BroCodez wow! Thanks for the reply. Yea inteli J doesn’t show the whole ‘default package’ but my images are within the same folder as my classes. I’ve also set the image observer to null.

    • @oussamagoumghar1596
      @oussamagoumghar1596 3 ปีที่แล้ว

      @@johnnymccauley5923 i have the same problem can you help me

    • @johnnymccauley5923
      @johnnymccauley5923 3 ปีที่แล้ว +1

      @@oussamagoumghar1596 heys! I haven’t revisited it since but I did do another UI tutorial with labels. Move the images outside the package.

    • @oussamagoumghar1596
      @oussamagoumghar1596 3 ปีที่แล้ว

      Thanks Johnny

  • @ashwinsights3952
    @ashwinsights3952 2 ปีที่แล้ว +1

    BRO CODE !!!!! PLS REPLY i want to get width and height from ym java graphics but i dont know how to get width and height from a java graphics so pls tell me how to do that

    • @Blackilykat
      @Blackilykat 2 ปีที่แล้ว +1

      Since the draw method is a void type, you can't directly get them. That's the reason he used separate variables to move the position in this video. You pretty much have to do the same, create separate variables and set those as the height and width.

    • @Blackilykat
      @Blackilykat 2 ปีที่แล้ว

      @@ashwinsights3952 sorry for the late reply. Did you want to get it from a frame, panel or label?

  • @chienlai6036
    @chienlai6036 2 ปีที่แล้ว

    How can i remove the white background of the image

  • @pauljolou3617
    @pauljolou3617 2 ปีที่แล้ว

    Is there any way that you can able to click the enemy?

  • @thienvuphan6840
    @thienvuphan6840 3 ปีที่แล้ว

    i did following that you did but my image don`t show out

  • @damiengraulvehus8836
    @damiengraulvehus8836 2 ปีที่แล้ว

    The paint method rewritting doesn't work for me, the image doesn't appear ... i wrote everything for sure (i read my code a 10 times),
    what can be the problem ?

    • @Blackilykat
      @Blackilykat 2 ปีที่แล้ว

      always share the code itself when making a question about it

    • @ducky1870
      @ducky1870 ปีที่แล้ว

      this is really late but what I found is that you need to change the overriden Paint method to paintComponent. Then change super.paint() to super.paintComponent()

  • @ibrahimylmaz8378
    @ibrahimylmaz8378 2 ปีที่แล้ว

    thanks bro

  • @louissmitty5064
    @louissmitty5064 2 ปีที่แล้ว

    Is there a way to repaint individual objects?

    • @Blackilykat
      @Blackilykat 2 ปีที่แล้ว

      You could put the objects in different JPanels and individually update those

  • @onlytheflames
    @onlytheflames 2 ปีที่แล้ว

    how do you make the animationt to stop?

  • @aqibishaq885
    @aqibishaq885 4 ปีที่แล้ว

    wao superrr

  • @WhiteWallAh_
    @WhiteWallAh_ 11 หลายเดือนก่อน

    woow he used eclipse

  • @andreleao.prodemge
    @andreleao.prodemge ปีที่แล้ว

    Hello how are you? Can anyone help me on how I can use Graphics2D other than using JFrame, JPanel or Applets? So, my project is web, I need the drawing to be rendered in a DIV, HTML element. Can someone help me? I've looked on many websites and videos, but they all just talk about JFrame, JPanel, Applets...

  • @pobrika2631
    @pobrika2631 ปีที่แล้ว

    Please apply for teacher position at my school.

  • @chingoputoh7969
    @chingoputoh7969 2 ปีที่แล้ว

    Thanks so much man I was hopelessly stuck with my school project

  • @augustinejoseph4302
    @augustinejoseph4302 ปีที่แล้ว

    👍👍👍

  • @timurelfiki
    @timurelfiki 2 ปีที่แล้ว

    Hello from Russia🇷🇺!

  • @MrLoser-ks2xn
    @MrLoser-ks2xn ปีที่แล้ว

  • @elvastaudinger4991
    @elvastaudinger4991 3 ปีที่แล้ว

    Timer doesn't work including star(). java.awt.Timer was imported. i just cannot pass parameter Timer().
    why?
    thank you.

    • @ameersuhail4981
      @ameersuhail4981 3 ปีที่แล้ว +1

      That's because, the Timer import on javax.swing.Timer; that used in this program

    • @Blackilykat
      @Blackilykat 2 ปีที่แล้ว

      Cause it doesn't use java.awt.Timer, but javax.swing.Timer. I suggest importing javax.swing.*, java.awt.* and java.awt.event.* to avoid these issues

  • @jorgetavares4136
    @jorgetavares4136 2 ปีที่แล้ว

    Hi guys.
    I am following the instructions but my Panel doesn't not show up

    • @Blackilykat
      @Blackilykat 2 ปีที่แล้ว

      did you make a JFrame and added the JPanel inside?

  • @romawar1869
    @romawar1869 2 ปีที่แล้ว

    Thank you

  • @louiemunoz
    @louiemunoz 2 ปีที่แล้ว

    thanks

  • @MrLoser-ks2xn
    @MrLoser-ks2xn 2 ปีที่แล้ว

    Thanks

  • @martinpeterpaulparma8228
    @martinpeterpaulparma8228 2 ปีที่แล้ว

    I cant run it whyyy? How can you all run it

  • @ANONYMOUS-yv6ik
    @ANONYMOUS-yv6ik 2 ปีที่แล้ว

    Please talk about 3d 🙏🙏🙏

    • @Blackilykat
      @Blackilykat 2 ปีที่แล้ว

      Either get a separate engine or do maths to calculate it using the fillPolygon function in the video earlier. I don't think there's a class just for 3d, but you might wanna google that

  • @fitfirst1858
    @fitfirst1858 4 ปีที่แล้ว

    thank you!!

    • @BroCodez
      @BroCodez  4 ปีที่แล้ว

      thank you for watching fafa

  • @thorbenschott2481
    @thorbenschott2481 2 ปีที่แล้ว

    one more comment for the algorithm

  • @eugenezuev7349
    @eugenezuev7349 3 หลายเดือนก่อน

  • @andreeairina4750
    @andreeairina4750 3 ปีที่แล้ว

    👍🏻

  • @mahmoodkanj9078
    @mahmoodkanj9078 3 ปีที่แล้ว

    shet man

  • @mosabxgamer3335
    @mosabxgamer3335 2 ปีที่แล้ว +1

    //xD//

  • @evandervallejera2820
    @evandervallejera2820 ปีที่แล้ว

    hi