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

You fix it by looking at the API documentation for JList and using method names that are documented there. You didn't post the error messages like you should, but each of those 3 lines tries to call a method that doesn't exist for JList. You can't just guess or make up methoid names for API classes.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.