URL « Icon Image « Java Swing Q&A





1. images and urls in Java GUI    coderanch.com

2. Relative URL for icon (jbuilder specific)    coderanch.com

I am trying to convert files written in Visual Cafe to JBuilder. The files now compile, but I am unable to see the buttons with a realitive URL image. They do show when the appplication is run, but not in design mode. Here is the code: OKJButoon.setIcon(new IMageIcon(new java.net.url("path/image.jpg"))); files are in another directory on the c:/drive, but it's important the ...

3. Problem creating an image from a remote url    coderanch.com

I am creating a servlet which does the following: 1. retrieves an image from a remote url 2. resizes the image 3. sends the image to the client. The servlet works fine when I run it on my PC, but when I run it on the server, it doesn't. Here's the problematic code private Image getRemoteImage(String imageUrl) throws Exception { System.err.println("in ...