Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

slideshowinjavanetbeansIwanttoinserttimerinthefollowingcodesothattheimagescanautomaticallychangeaftersomeseconds

void initImage() {
        String[] filesname = {"img1.png", "img2.png", "img3.png", "img4.png", "img5.png", "img6.png", "img7.png", "img8.png"};
        for (String s : filesname) {
            Icon icon = new ImageIcon("src/images/" + s);
            JLabel label = new JLabel(icon);
            imagepanel.add(label);
        }
        cardlayout = new CardLayout();
        imagepanel.setLayout(cardlayout);
    }

Comments