Yes. Instead of typing the declaration/initialization, condition and increment/decrement, you just go through two steps.

That is pretty easy. An example is here:-
[CODE]import java.awt.;
import javax.swing.

class <your className> {
Image im = new ImageIcon("Yourimage.jpeg/png").getImage();
JFrame frame;
public static void main(String[] args) {
<your className> y = new <your className>();
public void go() {
/*normal GUI code would appear here

  • with one important difference
  • making your own panel :)
    frame = new JFrame();
    <yourPanel> p = new <yourPanel>();
    now for the panel...
    make a class that extends JPanel
    and override one method - paintComponent();
    never call this method yourself,
    however you can call repaint();
    which will ultimately lead to paintComponent();
    class <yourPanel> extends JPanel {
    public void paintComponent(Graphics g) {
    g.drawImage(frame, 0, 0, this);
    parameter explained--
    1. parent component
    2. x distance
    3. y distance
    4. image display unit


  1. First of all, look in the JavaScript forum.
  2. [B]Onclick[/B] = wrong spelling; [B]OnClick[/B] = correct spelling
  3. Better write [CODE]"javascript:hello"[/CODE].
  4. Image is NOT AN INPUT TYPE: easy way to make that work =
    [CODE]<a href="javascript:hello" ><img src="[B]e[/B]g width="" height="" alt="" border="0"></img></a>[/CODE]