February 06, 2012

How to add a image on java button on mouse over

Setting Icon for button that changes on mouse over  

       ImageIcon icon = new ImageIcon("javacode/image.gif");
            ImageIcon iconOver = new ImageIcon("javacode/image_over.gif");
            btn = new JButton(icon);
            //btn.setToolTipText("java blog belazy");

This code will show you how to put image on button in java which change on mouse over .

java source codes

Facebook comments