Search:

Type: Posts; User: Lorack

Search: Search took 0.09 seconds.

  1. Replies
    4
    Views
    1,050

    [SOLVED] Re: Trying to fix repaint method

    You need to add if( key == KeyEvent.VK_DOWN) in keyReleased or else it won't stop :)


    public void keyReleased(KeyEvent e) {
    int key = e.getKeyCode();

    if (key == KeyEvent.VK_RIGHT) {...
  2. Replies
    4
    Views
    1,050

    [SOLVED] Re: Trying to fix repaint method

    I fixed it by changing
    public void paint(Graphics draw2D){
    super.paint(draw2D);
  3. Replies
    4
    Views
    1,050

    [SOLVED] Trying to fix repaint method

    So I'm trying to move a rectangle... but it leaves footprints...repaint(); doesn't seem to work in actionPerformed

    Thanks!



    import javax.swing.*;
    import java.awt.*;
    import...
Results 1 to 3 of 3