Results 1 to 3 of 3
  1. #1
    Martino is offline Member
    Join Date
    Apr 2011
    Posts
    12
    Rep Power
    0

    Default Problem with Graphics OO programming Java.

    Hello,

    I want to program Graphics in Java. Then, I would llike to program in that way that it is OO.

    For example, If I have Graphics field, and I want to visualize an arrow at specific x and y, only by using the method paint(x, y).

    In that way, I can use this message piant or Repaint. That is a lot easier than typing all by meeud

    Best wishes,

    Martijn

  2. #2
    Martino is offline Member
    Join Date
    Apr 2011
    Posts
    12
    Rep Power
    0

    Default Java OO Graphics.

    Hello,

    I would like program in Java in OO, but in Graphics.

  3. #3
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,939
    Rep Power
    8

    Default

    Huh? What you are talking about sounds like a really bad design, and it's not how things are done.

    Keep track of a collection of stuff you want to draw, and draw that in your paintComponent() method. Add or remove stuff from that collection, then call repaint().
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. Problem in Graphics
    By justbeller in forum Java 2D
    Replies: 1
    Last Post: 04-03-2011, 12:39 PM
  2. Graphics problem
    By luke24 in forum New To Java
    Replies: 7
    Last Post: 02-19-2011, 08:19 PM
  3. Replies: 1
    Last Post: 06-15-2010, 11:57 PM
  4. i am having a problem with creating graphics
    By umpire43055 in forum AWT / Swing
    Replies: 3
    Last Post: 08-07-2009, 05:26 AM
  5. Problem in printing java graphics
    By Mahendra in forum Java 2D
    Replies: 0
    Last Post: 01-23-2008, 12:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •