| Reply | « Previous Thread | Next Thread » |
|
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. Code:
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? Regards Ziad
Last edited by belzi : 2008-09-15 at 12:38.
|
|
Hi belzi,
since J2MEPolish Forms are actually based on Canvas, using VideoControl.USE_GUI_PRIMITIVE is probably wrong. You could try doing some tests with USE_DIRECT_VIDEO (and maybe avoiding to append the Video Item to your Form) and see what happens.. Pit |
|
Hi Belzi
All J2mePolish Forms are infact based on Canvas. Ue direct video instead. If you want to retain the look and feel of your application for viewfinder then use the following. Canvas canvas = StyleSheet.currentScreen; canvas = MasterCanvas.instance; videoControl.initDisplayMode( VideoControl.USE_DIRECT_VIDEO, canvas ); Use a J2ME Polish Form as you were and use the above code to intergrate the viewfinder. |
|
Hi,
I am using j2mepolish-2[1].0.4.jar and netbeans 6.0 , after i install polish and start netbeans i get a message as.. Warning - could not install some modules: enough-polish-netbeans - The module Java Platform was requested in version >= 1.10 but only 1.9.1 was found. does any one know what i should do to solve this..? |
|
Hi Everyone,
I have the same problem I too get the same warning message "The module Java Platform was requested in version >= 1.10 but only 1.9.1 was found." I have Netbeans 6.0. Can someone help me with this? regards, Hasarinda |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Ayuda con j2me polish | robervelez | Foro en Español (Spanish Forum) | 2 | 2007-06-06 21:44 |
| J2ME Polish Version 1.0 | enough | Mobile Java General | 0 | 2004-07-27 02:10 |
| J2ME Polish Version 1.0 RC6 | enough | Mobile Java General | 1 | 2004-07-20 12:25 |
| J2ME Polish Version 1.0 RC5 | enough | Mobile Java General | 1 | 2004-07-08 17:34 |
| J2ME Polish 1.0 RC1! | enough | Mobile Java General | 1 | 2004-06-15 03:53 |