[Solved] ImageIcon by JLabel example with absolute positioning


The image I need has to move around the screen

An important piece of information missing in the original question. I don’t have a problem using a null layout for this.

I wanted to move around with arrow keys on the screen?

And don’t use a KeyListener for this. Instead you should be using Key Bindings.

See the KeyboardAnimation.java code found in Motion Using the Keyboard for one solution to this problem.

8

solved ImageIcon by JLabel example with absolute positioning