Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > image on applet/stand-alone program

Reply
Thread Tools

image on applet/stand-alone program

 
 
Guest
Posts: n/a
 
      09-12-2003
I have create my program to run as Applet and Stand-Alone too.

My problem is that, 'Image' created from 'Image getImage(URL url)'
works perfect in Applet but don't work in Stand-Alone program


 
Reply With Quote
 
 
 
 
Guest
Posts: n/a
 
      09-12-2003
> I have create my program to run as Applet and Stand-Alone too.
>
> My problem is that, 'Image' created from 'Image getImage(URL url)'
> works perfect in Applet but don't work in Stand-Alone program


I add the applet into a 'Frame' created in 'main()'

The problem occurs as an Exception when I run code:
--------
Image ab = myApplet.getImage(new URL(myApplet.getCodeBase() + a));
--------
I have a 'NullPointerException' in 'getCodeBase()'

What is the problem?
What I can do?

Thanks


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
System program/ Application program ?? Parvsandhu Java 2 07-11-2005 09:08 AM
wx.Image: Couldn't add an image to the image list. Laszlo Zsolt Nagy Python 1 01-26-2005 09:55 PM
how to convert a java program to an exe program ola Java 3 02-16-2004 09:42 AM
Calling Java program in another Java program Rey Java 4 12-12-2003 10:18 PM
passing data between Java program and C program--help pipi Java 1 07-21-2003 05:02 AM



Advertisments