Java2D removing old pixels after moving image?
问题 So I'm moving an image in Java2D and it bounces aswell. For some reason, it always leaves behind a trail of old images. How could I fix this? Main class: package org.main.graphics; import java.awt.Graphics; import java.io.IOException; import java.util.ArrayList; import java.util.List; import javax.swing.JFrame; import org.main.entity.Entity; import org.main.entity.Loael; @SuppressWarnings("serial") public class GameWindow extends JFrame implements Runnable { private List<Entity> entities =