swing to read stock list from a file

swing to read stock list from a file

Posted 18 August 2009 - 01:38 AM

hi, i have created a swing program to display stock information whenever i click the "Next" Button but now soon as it gets to the try{} it does nothing meaning it doesn't read from my file but rather goes straight to the catch{}. please help, i have the code below

Replies To: swing to read stock list from a file

Re: swing to read stock list from a file

Posted 18 August 2009 - 02:10 AM

sammantah, on 18 Aug, 2009 - 07:38 AM, said:

hi, i have created a swing program to display stock information whenever i click the "Next" Button but now soon as it gets to the try{} it does nothing meaning it doesn't read from my file but rather goes straight to the catch{}. please help, i have the code below

are you sure the file has been onpened OK? I suggest printing the exception message so you can see what the cause was

Re: swing to read stock list from a file

Posted 18 August 2009 - 02:35 AM

horace, on 18 Aug, 2009 - 01:10 AM, said:

sammantah, on 18 Aug, 2009 - 07:38 AM, said:

hi, i have created a swing program to display stock information whenever i click the "Next" Button but now soon as it gets to the try{} it does nothing meaning it doesn't read from my file but rather goes straight to the catch{}. please help, i have the code below

are you sure the file has been onpened OK? I suggest printing the exception message so you can see what the cause was

i dunno but the code didn't compile at all as java application or java beans did it run with any one else?

Re: swing to read stock list from a file

Posted 18 August 2009 - 03:27 AM

oQMr FoxQo, on 18 Aug, 2009 - 08:35 AM, said:

horace, on 18 Aug, 2009 - 01:10 AM, said:

sammantah, on 18 Aug, 2009 - 07:38 AM, said:

hi, i have created a swing program to display stock information whenever i click the "Next" Button but now soon as it gets to the try{} it does nothing meaning it doesn't read from my file but rather goes straight to the catch{}. please help, i have the code below

are you sure the file has been onpened OK? I suggest printing the exception message so you can see what the cause was

i dunno but the code didn't compile at all as java application or java beans did it run with any one else?

it compiled OK on my machine - I created an empty hotStocks.dat file and updated this to print an Exception message

hi, i have created a swing program to display stock information whenever i click the "Next" Button but now soon as it gets to the try{} it does nothing meaning it doesn't read from my file but rather goes straight to the catch{}. please help, i have the code below

are you sure the file has been onpened OK? I suggest printing the exception message so you can see what the cause was

i dunno but the code didn't compile at all as java application or java beans did it run with any one else?

it compiled OK on my machine - I created an empty hotStocks.dat file and updated this to print an Exception message

hi, i have created a swing program to display stock information whenever i click the "Next" Button but now soon as it gets to the try{} it does nothing meaning it doesn't read from my file but rather goes straight to the catch{}. please help, i have the code below

are you sure the file has been onpened OK? I suggest printing the exception message so you can see what the cause was

i dunno but the code didn't compile at all as java application or java beans did it run with any one else?

it compiled OK on my machine - I created an empty hotStocks.dat file and updated this to print an Exception message

hi, i have created a swing program to display stock information whenever i click the "Next" Button but now soon as it gets to the try{} it does nothing meaning it doesn't read from my file but rather goes straight to the catch{}. please help, i have the code below

are you sure the file has been onpened OK? I suggest printing the exception message so you can see what the cause was

i dunno but the code didn't compile at all as java application or java beans did it run with any one else?

it compiled OK on my machine - I created an empty hotStocks.dat file and updated this to print an Exception message

are you sure the file is properly encoded UTF?
if in actionPerformed() I change the input.readUTF()s to input.readLine()s and remove the call to clearFields();
when I click Next it reads data and display it in the Frame

hi, i have created a swing program to display stock information whenever i click the "Next" Button but now soon as it gets to the try{} it does nothing meaning it doesn't read from my file but rather goes straight to the catch{}. please help, i have the code below

are you sure the file has been onpened OK? I suggest printing the exception message so you can see what the cause was

i dunno but the code didn't compile at all as java application or java beans did it run with any one else?

it compiled OK on my machine - I created an empty hotStocks.dat file and updated this to print an Exception message