This works but

somethings bothering me i keep geting a exception when i close the applet viewer it runs fine in the prowser it says that their is a exception occuring outside the vm in the native code
if anyone sees why or sees anyway i could make this cleaner tell me
thanks in advance
import java.awt.*;
import java.applet.*;
import java.io.*;
import java.net.URL;
import java.util.StringTokenizer;
import java.lang.String.*;
public class readingfiles4 extends Applet
int lpi = 0;
int lpii = 0;
int dumyvar = 0;
String dumystring = "";
String dumystringb = "";
int[][] polygon_array ;
int[][] temp_array ;
public void init()
polygon_array = new int[10][8] ;
temp_array = new int[10][8];
try{
URL url = new URL(getCodeBase(), "Myvectors.txt");
InputStream instream = url.openStream();
BufferedReader in = new BufferedReader(new InputStreamReader(instream));
lpi = 0;
while((dumystring = in.readLine()) != null) {  // get first line and check for null
StringTokenizer st = new StringTokenizer(dumystring,",");
while (st.hasMoreTokens()) {
lpii ++;
polygon_array[lpi][0] = lpii ; // number of vertices*2 = lpii at the end starts off with this
//------------will do this later make the array dynamic-------
//------------code for loading in the array---------------------------
dumystringb = st.nextToken();
try{ // check if following is legal
dumyvar = Integer.parseInt(dumystringb ); // get the string convert it to int
} // end try
catch(NumberFormatException e){
System.out.println("not a number!");
} // end catch
polygon_array[lpi][lpii] = dumyvar ;
}//end for while more tokens
lpii = 0;
lpi ++;
} // end while
lpi = 0 ;
} // end try
catch(IOException e){}
} // end init
public void paint(Graphics g)
//-----------to test----------------------------------------------------------------------------------------
for(lpi = 0;lpi <=7;lpi++){  
for(lpii = 0;lpii <=7;lpii++){  
// g.drawString(" the str "+dumystring,30,50);
dumyvar = polygon_array[lpi][lpii];
g.drawString(" the lpi = "+lpi+" lpii ="+lpii,120,(18*lpii)+(160*lpi)+20);
g.drawString(" the array "+dumyvar,30+lpii,(18*lpii)+(160*lpi)+20);
}//endfor lpii
}//end for lpi

btw this just reads a text file from a applet when that text file is in the same folder it reads it as a string then converts it into ints to be stored in the array
in addition if the text file has any extra spaces in it
it messes it up and the text file is numbers seperated by commas

Similar Messages

  • I did the recommended re-install to resolve the missing MSVCR80.dll file. This worked, but I am now stymied by two error messages: "Apple Mobile Device failed to start" and "Apple application support not found". How to overcome?

    That worked, however I now get two error messages when I install I Tunes:
    o  Apple Mobile Device failed to start.
    o  Apple Application Support not found.
    This were of course deleted in the recommended re-install procedure to resolve the dll file, but repeated uninstalls and installs simply bring up these two error messages with a recommendation to install I Tune again. Installing the new I Tunes version seems to be problematic per the discussion groups and has no simple solution. SHould not the Genius bar be able to resolve this at an Apple Store? Want to buy a new I Phone 5S, but this problem effectively stymies this.

    See Troubleshooting issues with iTunes for Windows updates.
    tt2

  • I'm trying to make this work, but can't figure it out. Please help.

    I am trying to make a Presentation to email for others to see without a browser, but when I do, it doesn't show. I've downloaded Adobe Flash Player 10.0 r22, I've built the presentation, I've published the presentation and uploaded to my hosting. I have tried everythiing I can think of. It works on my machine; however, when I try to view it out of it's containing folder, it doesn't show anything but the preloader. Can someone please help me?
    I can send you an example of a working Presentation along with a Zip file containing my presentation with everything I've built if my explanation isn't quite clear. Please help.
    Thank you,

    Yes,
    I need to remove it from this forum.
    Sorry about that,
    R.A

  • After installing Mavericks I had problems copying to the server. Was advised to remove the com.apple.finder.plist from Preferences. This worked - but now I have lost the menu bar from my second screen! How do I get that back?

    I have tried re-inserting the com.apple.finder.plist into my Preferences folder and re-booting - this didn't work.

    First, that cannot be an iBook G4 as that machine cannot run Snow Leopard let alone Mountain Lion.  To run Snow Leopard it has to be an Intel processor, not a G4.  What does it show as the Model Identifier in About This Mac, More Info, System Report, Hardware, Model Identifier?
    Second, if you have erased the hard drive there should not be remnants of any prior content.  Even though Disk Warrior is saying nothing is wrong with the hard drive, it sounds as though there are problems.  You may want to consider simply replacing the hard drive so there are no questions about faults.  A good source is OWC, http://www.macsales.com where they also have on-line videos showing how to do the replacement.
    Third, you could also try again to restart using the Snow Leopard DVD/CD and use Disk Utility on that install disk to erase again, and do it a couple times, then try to install.  If it continues to refuse, then it sounds as though there is a fault with the hard drive.

  • I have installed Creative Cloud but it was not working so I tried to uninstall it - thought this worked but does not seem to?

    Creative Cloud Download & Install

    You haven't provided any information regarding in what way the software was not working.  If you can explain what you encountered when you tried to use it then it might be possible to point you to some helpful information.  If you uninstalled then you should try using the Cleaner tool before reinstalling.
    Adobe Creative Suite Cleaner Tool
    helps resolve installation problems for CS3 thru CS6 and for Creative Cloud
    http://www.adobe.com/support/contact/cscleanertool.html

  • I am using firefox 14.0. when i open my site with id & passwd then it's no show data of my web site. but same this work i do with ie7,8 or opera i can see data

    when i open firefox web browser with my id and passwd then i cannot see my full data.but same work i we do on ie7, 8 or opera i can see my all data so please solve my this problem

    i do all this work. but when i read that web script they read this type of script
    function context(){
    //This function takes care of Net 6 and IE.
    return false;
    and this side is developed in asp.jsp. in firefox it's not hatche data from server.so
    with source code change how i can run this site on Mozilla firefox 14.
    Please guide me for this problem

  • Open in new tab on right click fails to open in the current window when used in a dependent window called with window.open command from original window this worked fine until ver 4.0

    i have been using this page in all versions of firefox until ver 4.0 and it has worked fine
    https://npwas.com/dummy/charts/charts.html
    when this page is loaded enter a stock symbol in the text field "AAPL"
    then click one of the lower links --"Yahoo Headlines"-- and another window is opened with this code
    - function yahoolink(sqlstring, winnum) {
    - var myurl = "http://finance.yahoo.com/";
    - var mysymbol = document.SymbolForm.symbol.value;
    - var mysrc = myurl + sqlstring + mysymbol;
    - var mywindow = "mywindow" + winnum;
    - //alert("mywindow- " + mywindow);
    - if (sqlstring == "mb/")
    - mysrc = "http://messages.finance.yahoo.com/" + -sqlstring + mysymbol;
    window.open(mysrc,mywindow,'resizable=yes,titlebar1=1,toolbar=1,scrollbars=1');
    all this works but when i right click on a message or news item and select "OPEN IN NEW TAB" - it fails to open the tab in this current window it opens it in the parent window --
    the way i have always used this is to able to select news and right click all news items to read as new tabs and have all news items or messages to be grouped in the child window
    this is now broken or do i need to recode something??
    https:\\npwas.com come is my secure server and you may load the page and see the code
    so far i really love ver 4.0 especially the sppppppeeeeeeeeed!!!!
    keep up the great work
    thanx in advance
    tojo

    2 Solutions found in [http://support.mozilla.com/en-US/questions/791244]
    the user cor-el has a method that does not require any add-ons. He States
    This code in userChrome.css will move "Open Link in New Window" to the top of the context menu.
    <pre>@namespace url("<a href="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul</a>"); /* only needed once */
    #contentAreaContextMenu &gt; * { -moz-box-ordinal-group: 2; }
    #context-openlink { -moz-box-ordinal-group: 1 !important; }</pre>
    the user jay_ff shows how to do it using the Menu Editor Add-on
    1. Install the Menu Editor add-on from https://addons.mozilla.org/en-US/firefox/addon/menu-editor/ .
    2. After the installation, go to Firefox> add-ons (or simply use Ctrl+Shift+A)
    3. Go to the Menu Editor "Options"
    4. In the "Main context menu," simply grab the "Open link in New Tab" and place it below the "Open Link in New Window"
    5. and Voila! You may also change other menu options if you want to!
    I tried jay_ff method first and found that indeed changing the Main Context Menu did cause the hotlink context menu to change as well.

  • I am unable to open my Photoshop program after installing the entire Creative Suite: Premium Production 6. All other programs work, but with Photoshop it says that the program is "locked or in use by another user". I need this fixed immediately.

    I am unable to open my Photoshop program after installing the entire Creative Suite: Premium Production 6. All other programs work, but with Photoshop it says that it "Could not open a scratch file because the file is locked, you do not have necessary access permissions, or another program is using the file. Use the 'Properties' command in the Windows Explorer to unlock the file." Then I select "OK" and the next message comes up "Could not initialize Photoshop because the file is locked, you do not have the necessary permissions, or another program is using the file. Use the 'Properties' command in the Windows Explorer to unlock this file. I installed all of the programs on the same day from a CD. I need this fixed immediately.
    I am not interested in switching to Creative Cloud, so don't even suggest it. I spoke to Mashmi (or something to that effect) on the "Support" Chat and there was absolutely no support. Useless actually.
    Thanks in advance.

    Could not open a scratch file because the file is locked or you do not have the necessary access privileges. (…) | Mylen…
    Mylenium

  • How do I change my user name in syn? I typed in the wrong email address. And I cancelled syn thinking this may work but no luck.

    How do I change my user name in syn? I typed in the wrong email address. And I cancelled syn thinking this may work but no luck.

    You have to clear saved password for this page:
    # Open you login page (where you have to enter username and password).
    # Right click on page and select '''Page Info''' form context menu.
    # On last tab ('''Security''') there is '''View saved passwords''' button, click it and delete all saved passwords for this page.
    # Also clear all related cookies (just in case) there is button for this next to first one.

  • HT4356 My iPad does not find the printer. I have tried the HP app and it works, but in any other app the printer is not seen. How do I get this printer visible to the iPad. All my other network computers find and print with out a problem.

    My iPad does not find the printer. I have tried the HP app and it works, but in any other app the printer is not seen. How do I get this printer visible to the iPad. All my other network computers find and print with out a problem.

    hi
    could you tell us what the other app is please

  • IPhone 5 outgoing and incoming SMS works but incoming calls do not work. The dialler gets message this number is not in available in network.

    New I phone outgoing calls as well incoming SMS works but can not receive incoming calls. Caller gets the number does not exist in network.

         Like Superman, here I am to save the day! I can help you with your service in your home area dizzymslizzie. Let's start with what zip code are you in? Can I assume that there isn't any physical or liquid damage on the iPhone 5? Recently, there has been an update to the iPhone to iOS 7. If you have done this update then please provide the exact carrier version that's installed. Keep in mind that there is a difference in device performance between iOS 7 and the iOS 7 beta version. As you share this info, I will check the area to re-affirm that the issue is or is not network related.
    Thank you...
    ArnettH_VZW
    Follow us on Twitter @VZWSupport

  • Mid 2010 MacBook pro took a keyboard spill.  It still works but display is sooo dark - like no backlight.  I think this is an LED screen.  Does anyone know the fix for this?

    Hi all...  My mid 2010 MacBook Pro took a keyboard spill.  It still works but the display is very very dark.  A faint image can only be seen at an angle in very bright light.  I think this model has an LED screen.  Can anyone please tell me what the fix for this is?  Thank you sooooo much! 
    < Email Edited By Host >

    Spill Cleaning
    Some liquid has just spilled into your Mac. What should you do?
    Do
    Immediately shut down the computer and unplug the power cord.
    Remove the computer's battery (if you can)
    Disconnect any peripherals (printers, iPods, scanners, cameras, etc.)
    Lay the computer upside down on paper towels to get as much liquid as possible to drip out.
    Note what was spilled on your Mac.
    Bring the computer into an Apple store or AASP as soon as possible.
    Don't
    Don't try to turn it back on. Liquids can help electrical current move about the components of your Mac in destructive ways.
    Don't shake the computer (this will only spread the liquid around).
    Don't use a hair dryer on it (even at a low setting a hair dryer will damage sensitive components).

  • Sharepoint list dataheet view error "Cannot connect to the server at this time. You can continue working with this list, but some data may not be available"

    I have a List which is having around 14000 items in it.while opening that list in datasheet view it is giving error .
    Below is a summary of the issue:
    After selecting datasheet view beow error occurs:
        "Cannot connect to the server at this time.  You can continue working with this list, but some data may not be available."
        "Unable to retrieve all data."
        The item counts displays say 100 out of 14000 items.
    Exporting List to excel is giving only 2000 records out of 14000 records.
    Other Observations   -  
    This is happening to only one list on the site .There are other lists in the site whose no. of records is equal to 8000 to 9000.They are working absolutely fine without any error.
    Also, If I am saving this list as a template and creating another list with it ,then it is working absolutely fine with 14000 records,so the issue does not seem to be related with no. of records as the template list is working fine.
    I have checked the Alternate access mapping setting ,its fine.
    It should not be related to lookup,datefield or any other column as the list created from it template is working fine with all these columns.
    I checked below links also ,but doesn't seem to work in my case.
    http://social.technet.microsoft.com/forums/en-US/sharepointadminprevious/thread/974b9168-f548-409b-a7f9-a79b9fdd4c50/
    http://social.technet.microsoft.com/Forums/en-US/smallbusinessserver/thread/87077dd8-a329-48e8-b42d-d0a8bf87b082
    http://social.msdn.microsoft.com/Forums/en-US/sharepointgeneral/thread/dc757598-f670-4229-9f8a-07656346b9b0

    I have spent two days to resolve this issue. Microsoft has released two KBs with reference to this issue...but are not appearing in search results at the top.
    I am sharing my finding.
    1. First install the
    KB2552989 (Hopefully you might have already installed it. The KB detetcts it and informs the user.)
    2. Then update registry by adding new key for data fetch timeout as mentioned inKB2553007
    These two steps resolved the issue in our environment. Hope it might help others as well.
    Pradip T. ------------- MCTS(SharePoint 2010/Web)|MCPD(Web Development) https://www.mcpvirtualbusinesscard.com/VBCServer/paddytakate/profile

  • Help! My iPod touch won't let me download any apps. A message keeps coming up saying "This Apple ID cannot be used for the iTunes store. Please enter another Apple ID" I changed my ID to see if that would work but the same message still comes up.

    Help! My iPod touch won't let me download any apps. A message keeps coming up saying "This Apple ID cannot be used for the iTunes store. Please enter another Apple ID" I changed my ID to see if that would work but the same message still comes up.

    Where are you physically located?
    What country's Store are you using?
    The two have to be the same and the payment method for your account also has to be associated (billing address, where iTunes gift card was purchased) with that country.
    Has the ID(s) worked before for purchases for this country's store?

  • HT5622 my apple id is not working when i sign in from my laptop it works but when i sign in from my iphone4 then its not working it gives the message of "your aapleid or password is incorrect"? how can i solve this problem please help

    my apple id is not working when i sign in from my laptop it works but when i sign in from my iphone4 then its not working it gives the message of "your aapleid or password is incorrect"? how can i solve this problem please help

    Hey nocillado,
    Thanks for using Apple Support Communities.
    It sounds like you have 2 things you want to address. These articles can help you use iCloud with your existing Apple ID.
    Get help activating your iPhone
    http://support.apple.com/kb/ts3424
    Using your Apple ID for Apple services
    http://support.apple.com/kb/ht4895
    Using the same Apple ID for Store purchases and iCloud (recommended)
    Have a nice day,
    Mario

Maybe you are looking for

  • I backed up by phone and now icloud is not showing my pictures over 1400 of them help

    I backed my phone up and now icloud is not showing my pictures over 1400 of them. help?

  • Automatic generated PO

    hi gurus, when i do transfer of posting during shipment cost calculation a PO gets generated automatically it picks up a Purchase order TYPE NB,i need to change the PO type to ZF How can i assign that so that when an automatic PO gets generated it ha

  • Adding fields

    HI experts, My task is i need include a vendor field in the FBL3N output. I have copied the standard program but i am no getting any idea how to add a vendor field. I already find the tables and logic the extract from the database table but i am not

  • Lollipop is very bad... How to remove it ?

    I've made big mistake : I accepted to download Lollipop and since this moment, my tablet doesn't work very well...I don't speak about the ugly new design... It's horrible !!! How can I remove Lollipop and download the old kit kat ? How can I remove t

  • Error Message "error during material determination"

    Hello Gurus My end user reversed transaction DP90...the reversal took place with a goods issue still being shown (reversal of goods issue was not done).  When trying to run the DP90 again...I get this message I am receiving this error when running DP