I work with Java 1.3 under UNIX (Solaris 2.7). I want to load and to display an image-file (gif) in a window with the following statements:
public void paint(Graphics g)
{
...
Image img=getToolkit().getImage(file.gif);
g.drawImage(img,x,y,width,heigth,this);
...
}
I used to call the Java-program using "rsh" or "rlogin" to a remote
host. After calling "xhost +remote host", the image is displayed in a Java-window.
Recently, we changed access to remote hosts and now use the "ssh"-command.
Using X11-forwarding under ssh, the above mentioned statements do not display
the image any more. However, the Java-window is displayed.
I noticed, that ssh changes the DISPLAY-variable from display:0 to
display:x.0, where x is a number greater 0. When calling "ssh -x
host" (without X11-forwarding), again the image is displayed. The DIPLAY-variable
is not changed in this case.
My question is:
How can I display the image using X11-forwarding?
Are there Java-image-classes or methods which can handle DISPLAY-variables
of the form: "display:x.0"?
Thank you
Martin
-- _______________________________________________________________ Martin Linder Institut fuer Meteorologie und Klimaforschung Forschungszentrum Karlsruhe Postfach 3640 D-76021 Karlsruhe Tel: 07247-826026 Fax: 07247-826141 E-Mail: [EMAIL PROTECTED]