My applet wont show me pics

Hi,
I have created an applet that shows a simple animation.
Well i made it on me computer. I started off getting the images by typing the full url as shown below:
String path = "C://jbuilder3//myprojects//animation//";
String picsrc[] = { "emty.gif","m.gif","ma.gif","mat.gif","matx.gif" };
Toolkit kit = Toolkit.getDefaultToolkit();
for (int i=0; i < pic.length; i++) {
pic[i] = kit.getImage(path+ picsrc);
well i wont to all ways work on a web site so i changed a few lines:
String picsrc[] = { "emty.gif","m.gif","ma.gif","mat.gif","matx.gif" };
Toolkit kit = Toolkit.getDefaultToolkit();
for (int i=0; i < pic.length; i++) {
pic[i] = kit.getImage(getCodeBase()/*path*/+ picsrc[i]);
When i used the getCodeBase command me images dont appear, even if i put the images in the right place.
can you help me correct this please.
thanks in advance!!

Change your directory path:
FROM
"C://jbuilder3//myprojects//animation//";
To
"C:/jbuilder3/myprojects/animation";
I think that works properly

Similar Messages

  • My applet wont show values from mysql??

    This applet is working perfect in my local webserver but not on the internet can anyone telle me
    why??
    import java.sql.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.table.*;
    import java.applet.Applet;
    public class Test extends Applet implements ActionListener
            Button vis = new Button("Vis");
            int antal = 0;
            Object data[][] = new Object[100][2];
            String[] columnNames = new String[2];
            public void init()
              columnNames[0] = "Name";
              columnNames[1] = "Password";
              JTable table = new JTable(data, columnNames);
              JScrollPane scrollPane = new JScrollPane(table);
              table.setPreferredScrollableViewportSize(new Dimension(300, 50));
              setLayout(new BorderLayout());
              add(table.getTableHeader(), BorderLayout.NORTH);
              add(scrollPane, BorderLayout.CENTER);
              add(vis,BorderLayout.SOUTH);
              vis.addActionListener(this);
            public void visPoster()
            try {
            ConnectDB db = new ConnectDB( "jdbc:mysql://81.19.226.133/xxxxx","xxxxx","xxxxxx" );
            //ConnectDB db = new ConnectDB( "jdbc:mysql://localhost/rikif_dk", "aslan", "" );
            ResultSet row = db.Select( "SELECT navn,data FROM board" );
            for(int i=0;row.next();i++)
                int ii = 0;
                data[i][ii] = row.getString("navn");
                ii++;
                data[i][ii] = row.getString("data");
                ii++;
                } catch (SQLException e)
                catch(NullPointerException a)
                public void actionPerformed(ActionEvent e)
                    if(e.getSource() == vis)
                      visPoster();
                      this.repaint();
    My database class:
    import java.sql.*;
    class ConnectDB
         private Connection con;
         ConnectDB( String url, String username, String password )
              try
                  Class.forName("org.gjt.mm.mysql.Driver");
                   con = DriverManager.getConnection( url, username, password );
              catch( ClassNotFoundException c )
                   System.out.println( "Kunne ikke finde driveren. \n"+c );
              catch( SQLException cs )
                   System.out.println( "Kunne ikke forbinde til databasen. \n"+cs );
         public ResultSet Select( String SQL )
              ResultSet rs = null;
              try
                   Statement s = con.createStatement();
                   rs = s.executeQuery( SQL );
              catch( SQLException sc )
                   System.out.println( "Fejl i QUERY. \n"+sc );
              return rs;
         public void Insert( String SQL )
              try
                   Statement s = con.createStatement();
                   s.executeUpdate( SQL );
              catch( SQLException sc )
                   System.out.println( "Fejl i QUERY. \n"+sc );
    }

    U can see the applet here:
    http://www.rikif.dk/mysql/1.html

  • Which security software messes up iMac. Have Kaspersky, Rapport. screen is flickering at start up as well as 2 lines permanently on screen. My jpeg wont show as pics, docs only. What can I do?

    Preferences

    Yeah, first thing to try is to get rid of the Kaspersky and see if that fixes it. It doesn't have such a great reputation. A-V is usually not needed, but if you want to run anything, you might try Sophos free. Keep everything updated, especially Flash and Reader, if you have that (use Preview as the default pdf reader anyway.) Disable Java, not JavaScript, in the browser you use. Usually found in Preferences or Tools>plug-ins.
    http://support.kaspersky.com/8925
    See this article about malware and A-V in general.
    http://www.reedcorner.net/mmg/
    I've seen some problems with Rapport. On to that if removing the Kaspersky doesn't fix this.
    Best to google anything you might be considering installing in order to see what others may think of it. Also get WOT.
    Sophos may occasionally cause problems, so keep an eye on it too. Probably best not to use any A-V.
    Message was edited by: WZZZ

  • Wont show all my picture (folder) Files

    When I try to sync pics on to my phone, it wont show all of the folders I have in my pictures. It wont let me import the folder either?

    The best way to do this with manually created folders on your hard drive used for storing photos is to have a parent folder which contains all the folders that include photos you want transferred to your iPhone.
    Do not place a folder that contains photos within another folder that contains photos.
    Each folder that contains photos located in the parent folder should contain photos only.
    Select the parent folder to be synced with your iPhone and all folders within that contain photos only will be transferred to your iPhone.

  • Iphoto wont show any photos on Iphone 4 after update to 7.1

    Hi, everything was working perfect with my Iphoto and iphone when was the time to import the pic form the phone, but after update my Iphone 4 to ios 7.1 my Iphoto wont show any photos or videos to import from my iphone, please help !!! Im using Mac OS X 10.6.8, Iphone 4 Ios 7.1
    Thank you so much !

    Exactly the same ting has happened to me over te past few days with my ipad2... I too resorted to setting my ipad2 up as a new device again to get match working... There is definitely something screwy happening on 5.1 I think... It was fine till I updated

  • Windows Vista wont show iPhone in My Computer

    It wont show up in My Computer or as a digital camera. It works fine otherwise, it syncs fine with itunes. How do I make it show up as a removable device under My Computer? I'd like to do this in order to take the pictures that I took with the camera off onto my computer.
    Thanks
    null

    Actually, this is not true when it comes to pictures.
    I can pull pics from my iPhone using windows (via My Computer), Photoshop Elements, iTunes and Corel...
    Whenever I put my phone in the doc I am prompted by 3 programs to retrieve the pictures with. (rather annoying, actually...!!). And yes, all 3 work.

  • TS1368 I want to delete a lot of things childrens stories, albums which are not used which that are on my ipad. However when I go through Itunes it wont show me most of the stuff in my library. it takes ages to delete one at a time.

    I want to delete a lot of things childrens stories, albums which are not used which that are on my ipad. However when I go through Itunes it wont show me most of the stuff in my library. it takes ages to delete one at a time.
    Can you help please?

    Thanks King_Penguin for taking time to read and reply. 
    I just purchased this movie on Thursday, May 15, so just a few days ago.  I have never had any trouble whatsoever since I have been in Vietnam.  I have downloaded several movies and even music and they have all synced to my respected Apple products except for this purchase. 
    Sorry, I don't quite understand what you mean by studios and different versions.  Could you please explain? 
    I checked my purchased list in my purchase history under my account and there are no hidden items. 

  • IPhone 3G(S) wont show up in iTunes after installing Snow Leopard

    I just installed Snow Leopard 10.6.3 yesterday and now when I plug in my iPhone 3G(S) it wont launch iTunes and wont show up in iTunes when I open it.
    It launches and shows up in iPhoto with no problem?
    Any hints on what to do?

    This is now fixed after I installed the update to Snow Leopard 10.6.4

  • My iphone 4s sometimes wont show voice mail,sometimes wont ring just shows missed call,sometimes wont receive a text till next day. can anybody help me???

    My phone sometimes wont show voice mail,sometimes wont ring just shows missed calls,and some text messages wont show received till next day. Can anyone help?

    Settings > General > Reset > Reset Network Settings.
    Try reseating or replacing the SIM card.
    Basic troubleshooting from the User's Guide is reset, restart, restore (first from backup then as new). 
    Has any of the above been tried?

  • Video iPod Wont Show Up on iTunes 6.0.1 something

    halo
    ive got a fifth generation video ipod, and i think ive got itunes 6.0.1 or something of the sort, and whenever i hook it up to my computer via usb, the ipod displays the "do not disconnect" symbol but wont show up on itunes.
    what the heck do i do? muchos gracias for your help

    Does this article contain anything useful?
    (16375)

  • Ripped CDs wont show up in iTunes library

    I've recently got an iPod touch 5th generation, mainly because my MP3 player doesn't have enough space for my music. I've tried looking on the internet but nothing has really helped my situation.
    As I found out, you can't sync the iPod with Windows Media Player, which is where all of my music is stored. I found out that you had to download iTunes and then sync all of the songs from there to my iPod. Most of my songs showed up in my iTunes library after installing it (ones that had been converted to MP3 files on the internet for personal use for free via online websites).
    When I ripped some CDs to WMP on my computer, I was quite excited that I could have all of my favourite music on my iPod. All of the music that I want on my iPod is in one playlist together, so I thought I could just transfer them to iTunes and then sync them.
    After it had finished syncing to my iPod, I noticed that my ripped CD albums had not showed up in my iTunes library and had therefore not been synced to my iPod.
    I would really like for these to be put onto my iPod, for that is the whole reason of getting it, not just for the social media.
    I have about 4 CDs which I've ripped to WMP that I want on my iPod, but I cannot figure out any way of getting them onto it. They wont show up in my iTunes library but I can't understand why and I've searched the internet for solutions and nothing has helped me.
    Does anyone have any ways of helping me add my ripped CDs onto my iPod? I don't want to have to waste money on having to buy them all again from the iTunes store when I already have them in real life.

    From iTunes Help:
    If you have audio or video files on your computer, you can import them into iTunes so they appear in your iTunes library.
    To add media from MusicMatch Jukebox or Audible Manager to your iPod, iPhone, or iPad, you need to first import it into iTunes.
    Add items from your computer to your iTunes library
    Do either of the following:
    Drag a file or folder from the desktop to the iTunes window.If you add a folder, all the files it contains are added to your library.
    In iTunes, choose File > Add to Library, locate a file or folder, and click Open.
    By default, adding items to your iTunes library places a pointer to each file in the iTunes folder; the original file remains in the current location. For information about copying files to the iTunes folder instead of creating pointers to them, see Change where your iTunes files are stored. If the file is an unprotected WMA file and you have Windows Media Player Series 9 or later installed, iTunes makes a copy of the file and adds it to your iTunes library. The original WMA file remains unchanged. You can’t add protected WMA files or protected WMV files to iTunes.

  • I can't get some song on my iphone they work off of the computer but they wont show up on my phone they are in the "on my iphone" section but they gray and have a gray dotted circle next to them i have tried every thing I just want them on my phone HELP!

    I can't get some song on my iphone they work off of the computer but they wont show up on my phone they are in the "on my iphone" section but they gray and have a gray dotted circle next to them i have tried every thing I just want them on my phone HELP!!!

    You have posted to the iTunes Match forum, which your question does not seem to be related to. Is your question concerning iTunes Match or syncing with iTunes via USB?

  • Installed apps wont show all applications on E7-00

    I'm not really sure what happened in what order, but in the morning I tried installing Opera Mobile to phone memory and yesterday evening I tryed a few apps from the app store, not sure if this is important. For some reason the new opera mobile didn't show up in apps (i had old 10.1 installed on mass memory), tried to reinstall in mass memory but that failed. When I went to take a look in installed apps I only saw about 1/3 or 1/4th of the apps installed on my phone.
    Restarting the phone gives the same end result, it still wont show my full app list.
    EDIT: I just figured the problem out. I changed my phone language to english and the apps showed up again. My native language is Estonian, but at some points it's hard to understand the translations and I switched to English. I installed all my apps under english and just turned back to estonian yesterday.
    btw the same issue is with the camera. I have 2 folders - Camera and Kaamera, one is used when my phone is in english setting, other one is for estonian so pictures are mixed up between the two.

    It sounds like you have apps from two different accounts on your iPod/computer. You have to sign into your itunes account to transfer the apps. You also have to authorize the computer to use the account. YOu can also download apps at no addition cost. See:
    http://support.apple.com/kb/HT2519
    This covers authorization:
    http://support.apple.com/kb/HT1420

  • Me and my sister use the same itunes but on my new iphone i have a different apple id. how do i hook up my iphone to get the music from her account because my device wont show up in our itunes

    Me and my sister use the same itunes but on my new iphone i have a different apple id. how do i hook up my iphone to get the music from her account on to my iphone because my iphone wont show up in our itunes.

    1patiot1 wrote:
    someone please tell me how to fix this. I cant access any apps or anything because my old apple id keeps showing up on my phone and wont show the new one.
    You created a new AppleID?
    Why not simply update your old AppleID so you have only one iTunes account?

  • Ipod touch wont show up in usb or itunes help pages just bring me in circles.  how can i get it to show up.  I use windows xp at home and tried everything then tried a relatives computer using windows 7 and still nothing.  this is an older ipod touch

    the help pagers just bring me around in circles.  the ipod doesn't show up in system devices under the busses.  i've tried just about everything.  Im using windows xp at home and though maybe it was because of that. so went to a relatives and used a brand new lap top avus with windows 7 and it wont show up here either.  When i got the ipod a few days ago from a third party the only screen i could get to come up was a picture of a usb cord with an arrow pointing towards the itunes logo.  I downloaded i tunes and couldn't get it to change.  brought it to at&t store today they hooked it up with my usb cord to thier computer and suddenly the menu screens work and i could even get online with it yet when i try to hook it up to one of my computers it doesn't show up anywere where can i go to get this fixed and fixed quick jumping around the apple help pages have put me in a foul mood and im sick of it two days spent trying to get it to show now.  im sick of waiting around i need help asap so i can return this **** thing if it turns out it is broken somehow..which i dont think it is.

    What gen iPod (3,4?) did you buy?

Maybe you are looking for

  • ITunes 7.0.1.8 freezes during install

    I downloaded the new iTunes 7 and went to install the same way i have with the last few updates. I uninstalled old iTunes and QuickTime and turned off my virus scans and firewall. I ran iTunesSetup that i downloaded from the Apple site using Mozilla

  • How to edit the code of a text inside a div ?

    Hi! I need your help! =) How can I access the code of a DIV inside the Animate? I want to put some words in bold, and some other text formats. Thanks.

  • How to edit an existing workbook?

    I have an existing excel workbook (e.g. test.xls) that I wish to edit (e.g. add a new sheet to it). I know how to read in an EXCEL file using FileInputStream - but how on earth do I edit the contents of this file once it has been loaded into my HSSFW

  • Embeddable Report Designer Control with Windows 7

    I have a couple of questions. I am using Crystal Report XI in both Vb6 and VS2005. I am using the COM controls in both. The CRViewer and the Embeddable Report Designer Control. This has been working in XP fine. Not so good in Vista or Windows 7. I am

  • Spring Packaging within an EAR

    Can Spring be packaged within the ear?