The applet presented below reads a file and adds its contents to Choice component.

Java Code:
import java.applet.*;
import java.awt.*;
import java.net.*;
import java.io.*;

public class ReadDataInChoice extends Applet {
  Choice myChoice;
  
  public void init() {
    myChoice  = new java.awt.Choice();
    add(myChoice);
    readFile("dataforchoice.txt");
  }
  public void readFile(String f) {
    try {
      String anItem = "";
      URL source = new URL(getCodeBase(), f);
      BufferedReader in = 
         new BufferedReader(new InputStreamReader(source.openStream()));
      while(null != (anItem = in.readLine())) {
        myChoice.add(anItem);
      }
      in.close();
    }
    catch(Exception e) {
     e.printStackTrace();
    }
  }
}