Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Graphical Issue

  1. #1
    Member Gravity Games's Avatar
    Join Date
    May 2012
    Posts
    152
    Thanks
    6
    Thanked 1 Time in 1 Post

    Default Graphical Issue

    Hi, Gravity Games here, and I was working on a game project when I encountered a graphical error I've never had before:



    You see, when I add movement to the tick method of my object, the graphics repeatedly render on top of each other, as opposed to only rendering one time.
    Attached Images Attached Images
    Current Projects (and planned release dates):

    Chomp's Wacky Worlds [???] (PC, Android and Ouya)
    Kyle the Caiman [???] (PC, Android and Ouya)
    KTC: King Crocko's Mystic Maze [???] (PC, Android and Ouya)


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,166
    Thanks
    65
    Thanked 2,725 Times in 2,675 Posts

    Default Re: Graphical Issue

    Can you post a short program that compiles, executes and shows the problem. Your explanation does not provide many details on what the code is doing.
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Forum VIP
    Join Date
    Jul 2010
    Posts
    1,676
    Thanks
    25
    Thanked 329 Times in 305 Posts

    Default Re: Graphical Issue

    My guess is that you are using the paintComponent(Graphics g) method, and you did not call super.paintComponent(g) as the first thing in your method.
    NOTE TO NEW PEOPLE LOOKING FOR HELP ON FORUM:

    When asking for help, please follow these guidelines to receive better and more prompt help:
    1. Put your code in Java Tags. To do this, put [highlight=java] before your code and [/highlight] after your code.
    2. Give full details of errors and provide us with as much information about the situation as possible.
    3. Give us an example of what the output should look like when done correctly.

    Join the Airline Management Simulation Game to manage your own airline against other users in a virtual recreation of the United States Airline Industry. For more details, visit: http://airlinegame.orgfree.com/

Similar Threads

  1. Please, help with OOP program with graphical interface
    By tavicz in forum Object Oriented Programming
    Replies: 1
    Last Post: April 29th, 2012, 02:56 PM
  2. Java Issue / Cache issue
    By VisualPK in forum What's Wrong With My Code?
    Replies: 1
    Last Post: April 14th, 2012, 08:43 PM
  3. A GUI issue.
    By LasOz in forum What's Wrong With My Code?
    Replies: 9
    Last Post: March 9th, 2012, 12:46 AM
  4. Rule base for graphical editor / simulator
    By Alice in forum Java Theory & Questions
    Replies: 2
    Last Post: December 18th, 2010, 10:38 AM
  5. Help!how to get a graphical display of this game
    By makarov in forum What's Wrong With My Code?
    Replies: 1
    Last Post: December 17th, 2009, 11:15 AM