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

    Default Problem with Graphics OO programming Java.


    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,


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

    Default Java OO Graphics.


    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
    Washington, DC
    Rep Power


    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 - GameDev tutorials, free Java and JavaScript hosting!
    Static Void Games forum - Come say hello!

Similar Threads

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