The code below demonstrate how you can set you icon for a frame. You can only use images in gif, jpeg or png format for the icon.

Java Code:
Frame frame = new Frame("MyFame");
Image icon = Toolkit.getDefaultToolkit().getImage("logo.gif");
Label lbl = new Label("Welcome",Label.CENTER);
frame.add(lbl);
frame.setSize(400,400);
frame.setIconImage(icon);
frame.setVisible(true);