import javax.swing.*;

public class Exercice2 {

  public static void main(String[] args) {
    final JFrame frame=new JFrame();
    
    ListModel model=new AbstractListModel() {
      public int getSize() {
        return 12;
      }

      public Object getElementAt(int index) {
        return new Double(Math.cos(index*Math.PI/6.0));
      }
    };
    
    JList list=new JList(model);
    
    frame.setContentPane(new JScrollPane(list));
    
    frame.setSize(400,300);
    frame.show();
  }
}
