Need Help/Info, Please!...regarding Jars & Gifs

Have a problem, sure could use some help :)
1st, Some Details:
1) Running on IE 5.0 and Netscape 6.2, both using java 1.4 plug-in.
2) Reading applet off of server, policy permissions on for filePermission read all and runtime thread permissions
3) All my files are in http://IPaddress/directory1/directory2 and include my applet classes and my jar files
4) several Jar files contain classes and one contains gif images. also have a directory with gif images.
2nd, The Problem:
I need to read gif image from directory (ex, images/*.gif) and set them up as labels. Tried using the following code to access directory and the buttons work, but no picture.
JButton zoomin = new JButton(new ImageIcon("images/zoomin.gif"));
JButton fullext = new JButton(new ImageIcon("images/fullextent.gif"));
JButton identify = new JButton(new ImageIcon("images/identify.gif"));
JButton btn = new JButton(new ImageIcon("images/addtheme.gif"));
So had to use the URL way to do it:
URL url1 = getURL("/images/zoomin.gif");
URL url2 = getURL("/images/fullextent.gif");
URL url3 = getURL("/images/identify.gif");
URL url4 = getURL("/images/addtheme.gif");
JButton zoomin = new JButton(new ImageIcon(url1));
JButton fullext = new JButton(new ImageIcon(url2));
JButton identify = new JButton(new ImageIcon(url3));
JButton btn = new JButton(new ImageIcon(url4));
It now works. Unfortunately, I call a function (ex, makeToolBar()) from a class in one of my jar files. This function calls other function within the jar files and so on, to create a very elaborate tool bar. It gets the images from this tool bar using the relative address and not the URL. Is there anyway to fix this so the images will show up on this new tool bar?
ps, here is the HTML info:
<html>
<head>
</head>
<body>
<applet
codebase = "http://IP/directory1/directory2"
code="Applet.class"
archive="num1.jar,num2.jar,num3.jar,num4.jar,images.jar"
width=600 height=600>
</applet>
</body>
</html>

Don't put all the JAR files into one big JAR file!
You can have as many JAR files as you like. There's no (noticeable) size limit on a JAR. Put it this way - your JAR's gonna be no bigger than all the class files in it.
You don't have to have one for your Applet, but there are often compelling reasons to do so.
For a start, a browser will make a connection to the server for every class it needs to download. If you've got a lot of classes then that's a lot of overhead connecting and disconnecting with the server. A JAR file contains the same information and only requires one connection. That's an improvement for a start. Your JAR can be compressed too, thereby reducing the download time for the Applet. That can't be bad either.
If you put the images in with the code (or even in a separate JAR) then they can be loaded as local resources (from the JAR) without having to know about where the Applet came from.
Basically you're telling the JVM that there's some resources it should know about (eg, images.jar) and that if it gets asked for some sort of resource (a class file, an image, a text file, anything) then it should look in that JAR too.
Working with resources from the classpath is an absolute godsend once you've mastered it - no more having to hardcode directories!
If you're still having trouble with this then just keep posting.
Hope this helps.

Similar Messages

  • I need help quick please sold the iPod and before handing it over wanted to clear out info so pushed erase now there is only a plug icon for iTunes but it won't now recognize my computer what can I do??

    I need help quick please sold the iPod and before handing it over wanted to clear out info so pushed erase now there is only a plug icon for iTunes but it won't now recognize my computer what can I do??

    Try
    iOS: Device not recognized in iTunes for Windows
    or
    iPhone, iPad, iPod touch: Device not recognized in iTunes for Mac OS X

  • My screen is completely white, i've tried holding lock and home buttons as seen on you tube something called 'white screen of death' its goes black (think it switches off) then back to the white screen need help fast please!

    my screen is completely white, i've tried holding lock and home buttons as seen on you tube something called 'white screen of death' its goes black (think it switches off) then back to the white screen need help fast please!

    If you have not done a factory reset on the device, I recommend doing a complete  factory reset.  
    Factory Reset  - Warning this will reset device back to original factory settings.
    This method will not erase any MDN/MIN information
    Turn off the phone 
    Press Power + Volume Up/Down at the same time and hold until display will show a triage android screen 
    Display will show: 
    Reboot system Now 
    Apply sdcard:update.zip 
    Wipe Data/Factory Reset 
    Wipe Cache Partition
    Use VOL Down key to scroll down to "Wipe Data/Factory Reset", press home icon to select option and wipe device. 
    Display shows "All user data will be wiped out", press VOLUME Up to continue or VOLUME Down to exit. 
    Press Volume Up 
    Press Home to select "Reset System Now" - device will reboot
    If the problem persist I recommend having a store technician take a look at the device.
    Copy and paste the link below into your browser's address bar for the store locator.  
    http://www.verizonwireless.com/b2c/storelocator/index.jsp

  • Sound trouble need help urgent please

    Could somebody tell me how i can fix my problem.
    problem: when my curve 8520 is in silence profile en i start typing in a phnoe number i hear nothing,
    but when my phone is in normal profile i hear i beep with every number of the phone number i enter.
    so i want to know how i can stop my bb from making this noise

    My friend it is a fillable form, can i email you the pdf that iam trying to fill out? then would you be able to tell me how to do it please mate?
    I have attached the form, i need to fill in those boxes so that everything is accuratly height + spacing is correct, and to do it fast, thats all im after.
    Date: Sun, 27 Jun 2010 18:31:58 -0600
    From: [email protected]
    To: [email protected]
    Subject: Need Help Urgent Please
    If is a fillable form, just tab to the next field. What we do not understand from you is IF it is a fillable form or not. If it is not, then the 3 options I gave can be used. Placing text is always a problem. You might find it useful to turn on the grid to help in placing your typewriter fields. However, if it is fillable you do not have to create any fields to type in, you just leave the tool as the hand tool and select the predefined fields with the cursor or the tab key and type accordingly. If the field is a checkbox, then you just use the space key to activate it.
    So, are we talking about a fillable form or something that has the appearance of a form, but not fields to fill in. This is what Bernd has been try to find out and you keep suggesting it is fillable as we read what you have said.
    >

  • Need Help Fast Please

    Why does this code not do what I want to happen?
    I have a 7 non functional buttons above the buttons for the days in the month and I would like to be able to layout the buttons starting on the day that the month begins and ending where it ends.
    Like in the microsoft windows calander.
    Any ideas as to how I'd do this?
    I need help fast. Please.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.io.*;
    import java.util.*;
    public class MyDairy extends JFrame
         //Initilises Global Variables
         myHandler H = new myHandler();
         monthHandler J = new monthHandler();
         openHandler O = new openHandler();
         String monthName;
         JComboBox months;
         static String[] daysOfWeek = {"Sun", "Mon", "Tue", "Wed", "Thur", "Fri", "Sat"};
         static int[] daysInMonth = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; 
         JFileChooser box;
         public MyDairy()
              //Initilises the JComponents
              JMenuBar menuBar;
               JMenu menu;
              JMenuItem menuOpen;
              JMenuItem menuSave;
              JMenuItem menuExit;
              JButton dayName[] = new JButton[7];
              JButton day[] = new JButton[36];
              JPanel b;
              JPanel a;
              Calendar today = Calendar.getInstance();
              Calendar startOfMonth = Calendar.getInstance();
              startOfMonth.set(Calendar.DAY_OF_MONTH,1);
              startOfMonth.set(Calendar.DAY_OF_WEEK,7);
              System.out.print(startOfMonth);
              //Sets up the Layout
              setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              Container c = getContentPane();   
              c.setLayout(new BoxLayout(c, BoxLayout.Y_AXIS));
              a = new JPanel();   
              a.setLayout(new GridLayout(0, 7));
              b = new JPanel();   
              b.setLayout(new GridLayout(5, 7));
              //Sets up and adds the menu bar   
              menuBar = new JMenuBar();   
              setJMenuBar(menuBar);  
              //Adds the File menu
              menu = new JMenu("File");   
              menuBar.add(menu);
              //Adds the menu items      
              menuOpen = new JMenuItem("Open");     
              menu.add(menuOpen);
              menuSave = new JMenuItem("Save");     
              menu.add(menuSave);
              menuExit = new JMenuItem("Exit");     
              menu.add(menuExit);
              //Produses the ComboBox
              String[] name={"January", "Feburary", "March", "April", "May", "June", "July", "Augest", "September", "October", "November", "December"};
              months = new JComboBox(name);
              int m = today.get(Calendar.MONTH);
              int d2 = today.get(Calendar.DAY_OF_WEEK);
              System.out.print(d2);
              months.setSelectedIndex(m);
              months.addActionListener(J);
              c.add(months);
              c.add(Box.createVerticalStrut(10));
              switch (months.getSelectedIndex())         
                       case 0: for (int i=1; i<36; i++)                          {                   
                         if(i<4)                
                            day[i] = new JButton();                  
                            day.setEnabled(false);               }               
    int k = 1;                
    day[i] = new JButton(" "+k);                b.add(day[i]);                
    day[i].addActionListener(H);               k++;               
    }break;          
    //other case statement up to 11 are simaliar          }                     
    c.add(a);
              //Produces an Array of Buttons
              for (int i=1; i<36; i++)
                   day[i] = new JButton(" "+i);
                   b.add(day[i]);      
                   day[i].addActionListener(H);               
              c.add(b);
              updateNameField();
              setSize(400,400);
              show();
         }//constructor
         private void updateNameField()
              monthName = (String) months.getSelectedItem();
         class myHandler implements ActionListener
              public void actionPerformed(ActionEvent e)
                   new Text_Area(monthName);
         class openHandler implements ActionListener
              public void actionPerformed(ActionEvent e)
                   File f1 = New File ("2003.dat");
                   simpleSerializer S = new simpleSerializer(f1);
                   MyDairy = S.readObjectFromFile();
         class monthHandler implements ActionListener
              public void actionPerformed(ActionEvent e)
                   updateNameField();
         public static void main(String[] args)
              new MyDairy();

    Container c = getContentPane();
    c.setLayout(new BoxLayout(c, BoxLayout.Y_AXIS));don't code like above try something like...
    Box box=Box.createVerticalBox();
    c.add(box);
    ----so on
    Hope this will help...

  • So i have Two account on my imac OS X Lion 10.7.5 and dont have administrator and its locked need help asp please Someone!

    I have a Imac and i cant acces adminastrator Becuase my two users dont have becuase i took them i dident know that would happen and need help i dont wanna loose all the stuff in the imac so if you can help please message me asp

    Use the directions given here:
    http://osxdaily.com/2011/08/24/reset-mac-os-x-10-7-lion-password/

  • I need help urgent please :(

    Hi i'm too much worried about my laptop because before 1 hours its working perfectly and while i working on my laptop suddenly laptop is off and now when i presss power on button its on for 4 seconds with a fast fan voice and no display on screen and then again off what i do can any one help me please thansk a lot advanced....
    Regards,
    Osman

    Please diagnose your PC using the detailed instructions in the link below.
    The "HP PC Hardware Diagnositcs" will test all the hardware components of your PC.
    Testing using HP PC Hardware Diagnostics (UEFI)

  • ITunes Error Message. Still need help. Please.

    I still haven't been able to use my ITunes for about two months. I need help to fix the problem. Here's what it says when I try to start ITunes:
    Microsoft Visual C+ + runtime library
    Runtime Error!
    Program: C:\program files\itunes\itunes.exe
    This application has requested to terminate in an unusual way. Please contact the application’s support team for more information.
    If anyone can help me with this I would greatly, greatly appreciate it. Thanks.
      Windows XP  

    Have you tried un-installing iTunes, downloading the program again from Apple, and re-installing?
    It's always worth a try, as it should help you clear off anything causing the problem and start again.

  • Man do I need help.  Please....I'm begging.

    Ok, I've created a mess and I need help cleaning it up. In the process of trying to create, sync, and god know what else I've ended up with multiple copies multiple libraries located in various locations on my PCs external HD. The good news is that the library I want to keep is the one is iTunes is currently synced to. I was fairly certain what files I could remove and what not to but then I noticed something weird. When I open the advanced settings tap under preferences and look at the file path it was different that I thought it was. Instead this (what I normally see) "C:\Documents and Settings\elombardi\My Documents\My Music\iTunes\iTunes Music" I have this: "C:\Documents and Settings\elombardi\My Documents\My Music\iTunes\iTunes Music\iTunes1\iTunes Music". When I open the files to look at it the file "iTunes1" is located in the "iTunes Music" folder along with all the folders with the different artists listed. When I open "iTunes1" it appears to have all the same files as the normal "iTunes" folder with one exception, all the folders appear to be empty. The thing I find so strange is that why does iTunes seem to be working fine if it is pointed at this empty file folder? When I say empty, I mean if I open the folder "iTunes Music" in the "iTunes1" folder it has nothing in it. I'm afraid to delete it and point it to another directory as I don't want to lose my files. The ironic part is that I created this mess trying to do something relatively simple, move my files onto a new drive. Now that I know how to do it I can't figure out what files I need to move.

    Oh dear, a bit of a mess, you appear to haev created a new instance of itunes inside the music folder of your original iTunes folder.
    Just to be clear about your current state:
    The location of your iTunes Music folder as set in Preferences>advanced>general is:
    My Music\iTunes\iTunes Music\iTunes1\iTunes Music
    Do you know the location of the library file you are currently using? It is likely to be in iTunes1 from your preference setting, but you can check by starting iTunes with the shift key held down and then choosing iTunes library.itl in either iTunes or iTunes1 to see which is right.
    The location of your music files: If I understand you correctly, all the actual files are in My Music\iTunes\iTunes Music and the my Music\iTunes\iTunes Music\iTunes1\iTunes Music folder is empty.
    I wouldn't add any music to your collection at the moment as it will only complicate things.
    If you are happy that everything is working OK, the simplest way of dealing with this if you want to move immediately to an external drive is not to sort it out. Use the method in the following link to transfer your music to a new iTunes Music folder on the external drive. The current library file (itunes Library.itl) will remain where it is on the internal drive.
    http://docs.info.apple.com/article.html?artnum=305451
    Normally I would suggest a different method but it would result in exactly the same scrambled set up on the external drive.
    If you want to sort things out on your internal drive before the transfer, you need to confirm exactly how things are set up.

  • I have just reset my password about a hundred times and still the facetime and I messenger is not accepting my password, I previously had FaceTime working now nothing is happening, I need help now please

    I have just reset my password about a hundred times and still the face time and I messenger is not working, I previously used FaceTime once and now I need help urgently
    What am I not doing?

    Hi fatbear711.  are the following as follows?  Settings/restrictions:  Facetime and Camera are both ON?   Also in Game centre at bottom 'Adding Friends" is turned on?  If all ok, log into your account via itunes App, Click on your ID at bottom left of say the Music page, then click to 'Manage', enter password.  On next page click on your apple ID at top, then select to go to '[email protected]'. Log in on the browser window page that appears and confirm that your primary apple ID and primary email have been verified (should have green ticks and the word 'verified' next to them.  If you use itunes on a pc to sync with then do this through iTunes;Store menu on your pc, ensuring that you sync your device once finshed.  You will also need to check that your device is set to the correct timezone and time in your devices settings page.  If problem still persists at least we'll know the basics are ok.
    When you post again can you also include whether ipad2/3 etc and iOS e.g. 5.3.1/6.01 etc
    Best regards
    Nick

  • Ink cartridges stuck, need help asap please

    Hello a I am writint this because I need help!! I keep getting a message in error on my Macbook Pro about my Photsmart 6520 is jammed and it says to check to see if any obstructions are bloacking it. Hoever this is like the 20th time that I check inside the printer over and over again. I make sure everything is in order, however when I turn the printer back on it will say the same thing and I keep trying to get it to work, but it won't!!! I just got the printer the day before yesterday and I caanot fix it, please help it is urgent.
    This question was solved.
    View Solution.

    The troubleshooting steps in the document here may help resolve the carriage jam message on your Photosmart 6520 printer.  If the steps there do not resolve the issue I suggest you contact HP support.  If you are in the US or Canada call 1-800-HPINVENt, elsewhere see the contact information here.
    Bob Headrick,  HP Expert
    I am not an employee of HP, I am a volunteer posting here on my own time.
    If your problem is solved please click the "Accept as Solution" button ------------V
    If my answer was helpful please click the "Thumbs Up" to say "Thank You"--V

  • Error Message and Itunes won't open. NEED HELP ASAP PLEASE

    I tried to get into my iTunes from my desktop short cut and the error message saying "Problem with Shortcut" then saying "This action is only valid for products that are currently installed." ***??? Anyway I tried to download a new version of iTunes then it said it could no remove old files. SO, I tried to remove iTunes by add/remove programs and it won't let me.>> NEED HELP I LEAVE TOMORROW FOR TRAINING AND I NEED SOME MUSIC AND UPDATE ON MY IPOD>>>>

    Welcome to AD!
    Download, install, and run this tool from Microsoft. Use it to fix the iTunes and QuickTime programs, as well as Apple Software Updater.
    http://support.microsoft.com/kb/290301
    Then reinstall iTunes.
    If you need step-by-step directions, they are in the *General installation troubleshooting* section of this Apple article. Click on each line to expand the instructions.
    http://support.apple.com/kb/HT1926
    The Microsoft installer cleanup tool is listed in the third step, "Clean up iTunes installer files on the computer".

  • Noob Needs Help! Please Please Please Help!

    MD doing reserach on Genetic Mutations, I really need help on this, I have never used PL/SQL. Can somebody help me with this?
    I have a view made of mulitple table that has following columns: diagnosis, patient_id, kindred_id, column_d, colum_e.... column_p where each distinct combination of column_d to column_p means one specific mutation. I want to group patients who have same mutation to find out the following:
    for each mutation(unique column d through column p), I want to find out how many families have diagnosis 1, diagnosis 2, diagnosis 3...
    The rule is the program will look at kindre_id first, to see if this person's kindre_id has been looked at. If
    so, jump it/ignore it. If this kindred_id has never been looked at, treat it as a unique family. Diagnosis count for that diagnosis will then increase by 1. Sounds easy, but I don't know how to write that for loop that will do for each unique (column d, column c, ... column p) do the following... Does such a thing exist?

    Hi,
    SELECT     diagnosis
    ,     COUNT (DISTINCT kindred_id)     AS family_cnt
    ,     column_d
    ,     column_e
    ,     column_f
    FROM     table_x
    GROUP BY     diagnosis
    ,          column_d
    ,          column_e
    ,          column_f
    ;     produces this output:
    DIAGNOSIS FAMILY_CNT COLUMN_D   COLUMN_E   COLUMN_F
             1          2 abc        bca        acb
             2          2 abc        bca        acb
             3          2 abc        bca        acbwhich is the data you want, but not in the format you want. You want to pivot the family_cnt column from the three rows into three columns in one row. For general information about how to this, search for "pivot" on this or similar sites.
    One solution is:
    SELECT     COUNT (DISTINCT CASE WHEN diagnosis = 1 THEN kindred_id END)     AS diagnosis_1
    ,     COUNT (DISTINCT CASE WHEN diagnosis = 2 THEN kindred_id END)     AS diagnosis_2
    ,     COUNT (DISTINCT CASE WHEN diagnosis = 3 THEN kindred_id END)     AS diagnosis_3
    ,     column_d
    ,     column_e
    ,     column_f
    FROM     table_x
    GROUP BY     column_d
    ,          column_e
    ,          column_f
    ;     which produces the following output:
    DIAGNOSIS_1 DIAGNOSIS_2 DIAGNOSIS_3 COLUMN_D   COLUMN_E   COLUMN_F
              2           2           2 abc        bca        acbThis technique assumes that you know exactly how many different diagnoses there are and what the distinct values of the diagnosis column are. (I.e., in this example, I knew that that there were three diagnosie and that their values were 1, 2 and 3. I used that information to write three COUNT expressions, with values 1, 2 and 3 hard-coded into them.)
    So, what can you do if you do not know the diagnosis values? The columns have to be hard-coded into the query, so how can you possiblly write something today that will have all the values that are in the table next month? You can't, but you can write something today that you can run (unchanged) next month which will write such a query. In other words, you can do dynamic SQL, where you run a preliminary query to get the different diagnosis values, write an appropriate query similar to the one above, and then run that newly-created query. The PL/SQL command "EXECUTE IMMEDIATE" can help with this.
    The code above works in all versions of Oracle. In Oracle 11, there is a more straigtforward way of specifyng PIVOT in a SELECT statement.

  • Need help! Please view...

    Hello. I need help with another programming project that I want to write. What it should do at the very least would be to actually print the contents of a TextBox on a PC Printer, with the phone connected to the PC via Com Port(s) with cables. The MIDlet is currently written with MIDP 1.
    I'am aware that J2sdk SE has PrintJob and Book objects that actually simplify printing, but MIDP 1 has nothing of the sort.
    1.) what would you guys suggest? Is there a way for me to create a printer program in MIDP or do I have to create it with J2sdk SE?
    2.) if ever that the printer program would have to be written with j2sdk SE, how would I go about passing the actual data from the MIDlet to the program? Is it possible, and if it is, is there any way I could synchronize both?
    Thanks a lot.

    depends on what kind of communication you can establish over the serial cable. If you have the possibility to communicate using TCP/IP & HTTP i would use a servlet on the server side, send the data to the servlet, let the servlet do the whole template/layout und pre-print job and the print it from the servlet.
    This would give you a quite powerfull solution, since you may do a lot of work on the server side (like additional db operations, queueing print jobs, ...) and you could then connect to your little 'print server' via HTTP, means, no matter if the request comes via serial cable, internet, bluetooth....

  • What if i cant get a hold of the original owner of the phone???? I NEED HELP ASAP PLEASE

    I tried updating my Iphone 4s and things went wrong. i luckily backed up my phone before hand, but now when i turn it on, it gives me a white screen (as if i just bought the phone) and its telling me to enter a apple id and password, but when i put in my own it says that it cant activate the phone with my ID. apple support just tells me to get a hold of the original BUT WHAT IF I CANT. i constantly use my phone all the time and im in the of help. PLEASE.

    Then you can't use the iPhone, and Apple won't unlock it for you; the activation lock is an anti-theft measure. Sorry, but no help is available with this issue.
    (126360)

Maybe you are looking for

  • Display query columns in horizontal

    Hi all I'm creating a report using sql commands only(no report builder). I'd like to have my columns to be displayed in horizontal followed by its value. So far I've made it, however I can't get them to be displayed well where all the columns are in

  • Problem with ode45 in Mathscript

    Hello, I have a non linear model (aircraft) in matlab code .m and I want to use it in labview. I want to see the response of this model and for that I am using the ode_rk45 command of Mathscript. In Matlab it works perfectly but in Labview it takes a

  • Optical out dont work

    hi ppl my audigy 2 nx is conected to av receiver marantz sr 4000 whit optical out but don?t work can anybody help me ps: os windows vista 32 bit.

  • GarageBand in Mountain Lion

    Hello. Ever since I upgraded to Mountain Lion, GarageBand has not been fully functional (I can work with it, but certain functions, such as track editing, are not always available). Is there someplace I can download a Mountain Lion-conpatible version

  • Software updates on hong kong ipad in uk

    If I buy an ipad in when in hong kong, can I update the software back home in the uk