Could anybody say how can I fix this problem?
public class Kuular implements ActionListener {
ImageIcon f1 = new ImageIcon("C:\\Users\\Student\\Desktop\\pic1.jpg");
ImageIcon f2 = new ImageIcon("C:\\Users\\Student\\Desktop\\pic2.jpg");
ImageIcon f3 = new ImageIcon("C:\\Users\\Student\\Desktop\\pic3.jpg");
ImageIcon f4 = new ImageIcon("C:\\Users\\Student\\Desktop\\pic4.jpg");
List<ImageIcon> list1 = Arrays.asList(f1, f2, f3, f4);
List<ImageIcon> list2 = new ArrayList<ImageIcon>();
public void fs() {
Collections.shuffle(list1);
}
Kuular k = new Kuular();
k.fs();; // HERE
How can I call method fs?
Thanks!
Add a
main()method and execute the class