public class J_01_FLOW_08 extends JApplet implements ActionListener
{
String s_value[]={"white sox","red sox","mets","cordianls","blue jays"};
JList l_list = new JList(s_value);
JLabel l_label = new JLabel();
Container c;
FlowLayout flow = new FlowLayout();
public void init()
{
c = getContentPane();
c.setLayout(flow);
c.add(l_list);
c.add(b);
l_list.addActionListener(this);
}
public void actionPerformed(ActionEvent e)
{
String pick = l_list.getSelectedItem().toString();
if(l_list.isSelected() == true)
l_label.setText(pick);
}
}
getting error at
l_list.addActionListener(this);
String pick = l_list.getSelectedItem().toString();
if(l_list.isSelected() == true)
i dont know how to fix this