Hello all,
I am working on a project that displays URL images from the web in an applet.
I am using ImageIcon( URL ) to get my image from the web, but I am having
difficulty in displaying it.
My applet will display the image OK if the web browser proxy settings are
set to NONE, however if I use
my ISP's proxy the image is not displayed and I get a black screen.
---------------------------------------------------
public boolean loadMapImage( URL imageURL ) {
Image localImage = new javax.swing.ImageIcon( imageURL ).getImage() ;
if( localImage != null ) {
originalImage = new BufferedImage( localImage.getWidth( null ),
localImage.getHeight( null ), BufferedImage.TYPE_3BYTE_BGR ) ;
Graphics2D g2 = originalImage.createGraphics() ;
g2.drawImage( localImage, 0, 0, null ) ;
repaint() ;
return true ;
}
originalImage = null ;
return false ;
}
-----------------------------------------------------
The class with this method extends off Component.
Can anyone suggest another method of getting an image URL of the web or
spot my error.
Thanx
David
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".