package ru.test;
import javax.swing.*;
import java.awt.*;
public class Main
{
public static void main(String[] args){
SwingUtilities.invokeLater(new Runnable()
{
public void run()
{
JFrame frame = new JFrame("test");
frame.setSize(800, 400);
JLabel jLabel = new JLabel("test");
Image image = Toolkit.getDefaultToolkit().createImage("/home/valor/images/gifs/ajax-loader-round.gif");
ImageIcon imageIcon = new ImageIcon(image);
imageIcon.setImageObserver(jLabel);
jLabel.setIcon(imageIcon);
frame.add(jLabel);
frame.setVisible(true);
}
});
}
}