Home>
import java.awt. *;
import javax.swing. *;
import java.awt.event. *;
public class test extends japplet
implements itemlistener {
  jlabel jtf;
  imageicon a1, a2, a3;
  public void init () {
    container contentpane=getcontentpane ();
    contentpane.setlayout (new flowlayout ());
    jcombobox jc=new jcombobox ();
    jc.additem ("6");
    jc.additem ("7");
    jc.additem ("8");
    jc.additemlistener (this);
    contentpane.add (jc);
    jtf=new jlabel (new imageicon ("d:/data/images/6.gif"));
    contentpane.add (jtf);
  }
  public void itemstatechanged (itemevent ie) {
    string s=(string) ie.getitem ();
    jtf.seticon (new imageicon ("d:/data/images /" + s + ". gif"));
  }
}
  • Previous Detailed Centos installation MariaDB using YUM
  • Next ASPNET MVC5 Website Development My Consultation List and Add Consultation (12)