Looks like ad is never being constructed.  Thus, 

               ad.addElement(a);

throws a NullPointerException.

-Rob

On Fri, 12 Nov 1999, Dirk Waxweiler wrote:

> Vector ad = null;
> ...
>       void readwinners(String winners) throws Exception{
>       String a = null, b = null;
>       File infile = new File(winners);
>       BufferedReader br = new BufferedReader(new FileReader(infile));
>       do{
>           a = br.readLine();
>           System.out.println(a);
>           if (a != null) {
>               ad.addElement(a);
>           }
>       }while(a != null);
>     }
>     
>     public void actionPerformed(ActionEvent event){
>       String winnersstr = winnersTF.getText();
>       String address = addressTF.getText();
>       String outputfile = outputfileTF.getText();
>       try{
>           readwinners(winnersstr);
> ...
> 
> result: "java.lang.NullPointerException"
> 
> 
> ==========================================================
> Dirk Waxweiler
> incotech * 23,rue des Bruyères * L-1274 Howald/Luxembourg
> Tel.: +352 29 53 83 -1 * Fax: +352 29 53 83 222
> e-mail: [EMAIL PROTECTED] * internet: www.incotech.lu
> ==========================================================
> 
> 
> ----------------------------------------------------------------------
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
> 


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to