A image is read and is displayed as splash before the actual things come out. Now problem is that i want to fix the resolution of image accroding to the computer in which it get executed. How this can be done?

Code is as below 

```
import javax.swing.*;
import java.awt.*;

public class FrmSplash extends JWindow implements Runnable{
    public void run(){
        JLabel SplashLabel = new JLabel(new ImageIcon("Image001.jpg"));

            Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
    getContentPane().add(SplashLabel,BorderLayout.CENTER);

    setLocation((screen.width),(screen.height));
    show();
}
}

```

This on compilation give following error Note: Recompile with -Xlint:deprecation for details. Again compiled with -Xlint but more sorts of errors.