HI all,
I use a J2ME Polish and when i use a video i have an classCastException, knowing that when i dont use a J2ME Polish it works.
I get a java.lang.ClassCastException at lineCode:Player p; VideoControl vc; try { p = Manager.createPlayer("file:///C:/predefgallery/predefvideos/a.3gp"); p.realize(); // Grab the video control and set it to the current display. vc = (VideoControl)p.getControl("VideoControl"); if (vc != null) { Form form1 = new Form("video"); form1.append((Item)vc.initDisplayMode(VideoControl.USE_GUI_PRIMITIVE,null)); display.setCurrent(form1); } p.start(); } catch (IOException e) { e.printStackTrace(); //#debug info System.out.println(e.toString()); }
form1.append((Item)vc.initDisplayMode(VideoControl.USE_GUI_PRIMITIVE, null));
Any idea?

Reply With Quote


