Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Java Graphics Tutorial 1 - Learning the paint method

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
6,737
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jun 5, 2010

In the first graphics tutorial we will learn the paint method and how to set up a panel inside of our JFrame.

Category:

Howto & Style

Tags:

License:

Standard YouTube License

  • likes, 1 dislikes

Link to this comment:

Share to:
see all

All Comments (10)

Sign In or Sign Up now to post a comment!
  • @kellym1able give me your email and i'll send you one, i got a few ebooks you might be interested in on java 2d/3d game design that have what you're looking for

  • hey-

    do you know of any good java books for teaching/ referencing graphics programming/ physics design?

    i'm interested in doing modelling and simulation, and I"m looking for a really thorough reference for java.

    I understand the basics of object oriented programming, and can find enough online (pretty beginner, really)

    but I don't have much for finding information on the class libraries, essential language components (i.e. methods)

  • If I have a GUI editor, would it be possible to just create 2500 panels in the editor and then editing them?? Cause I also need to assign certain values to the panels and things never work out when I create them dynamically ; - ;

  • @mu3d93 could u import everything? and is it typed correctly?

  • @DjNightey you should proofread your own comments before posting them... haha

  • you should watch your own tutorial before you putting it up on youtube

  • @ArnisNewbie Creating inner class inside Frame class. Here's the code you must add inside the Frame class. private class Painting extends JPanel { private static final long serialVersionUID = 6888782312648977026L; public Painting() { setBackground(Color.RED); } public void paintComponent(Graphics g) { super.paintComponent(g); } }

  • @mu3d93 typing error.  You wrote: gui.setDefautCloseOperation(JF­­rame.EXIT_ON_CLOSE); and missed l from Default so correct line is gui.setDefaultCloseOperation(J­Frame.EXIT_ON_CLOSE);

  • i cant compile, the program found an error in this line -

    gui.setDefautCloseOperation(JF­rame.EXIT_ON_CLOSE);

    File: D:\java\Frame.java [line: 14]

    Error: D:\java\Frame.java:14: cannot find symbol

    symbol : method setDefautCloseOperation(int)

    location: class javax.swing.JFrame

  • How do you do this using only one *.java file?

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more