|
Replies:
5
-
Last Post:
Aug 11, 2008 7:58 AM
by: Shai Almog
|
|
|
|
|
|
|
canvas instance into LWUIT form
Posted:
Aug 8, 2008 12:57 AM
|
|
|
hi To all, i would like to add a Canvas instance as a Component into LWUIT form how i can do it?
rajesh
|
|
|
|
|
|
|
Re: canvas instance into LWUIT form
Posted:
Aug 8, 2008 1:05 AM
in response to: rjounwal
|
|
|
|
|
Hi, all LWUIT components are lightweight and allow you to override paint (com.sun.lwuit.Graphics) in order to paint anything anywhere so there is no technical need for Canvas. Since most MIDP related graphics API's are supported by LWUIT graphics (and some more) it should be pretty easy to port your Canvas to LWUIT. This would be the correct and portable way to achieve something of this type.
If you have a binary canvas which you can't modify you can follow the instructions in this thread, but this is not recommended: http://forums.java.net/jive/thread.jspa?messageID=277373
> hi To all, > i would like to add a Canvas instance as a Component > into LWUIT form how i can do it? > > rajesh > [Message sent by forum member 'rjounwal' (rjounwal)] > > http://forums.java.net/jive/thread.jspa?messageID=292253 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net > For additional commands, e-mail: users-help@lwuit.dev.java.net >
Shai Almog http://lwuit.blogspot.com/
[att1.html]
|
|
|
|
|
|
|
|
Re: canvas instance into LWUIT form
Posted:
Aug 8, 2008 3:39 AM
in response to: Shai Almog
|
|
|
Hi shai, Thanks for reply i had tried that given example but not able to run it. I found some issue: 1) I am not able to invoke paint() define in Canvaswraper class.
2) Is there any getGraphics() is present in Lwuit which return j2me Graphics instance, i haven't found it.I am using latest release API (LWUIT_20080714) .
Thanks rajesh
|
|
|
|
|
|
|
|
Re: canvas instance into LWUIT form
Posted:
Aug 8, 2008 5:46 AM
in response to: rjounwal
|
|
|
|
|
Hi rojunwal, 1) If the paint method was kept protected and you can't derive from the class then you are out of luck.
2) Please read the entire thread which discusses the package protected nature of the method... Your code must be in the same package.
I suggest you talk with the supplier of the classes, generally its very easy to build a map component in LWUIT.
> Hi shai, > Thanks for reply i had tried that given example but not > able to run it. > I found some issue: > 1) I am not able to invoke paint() define in Canvaswraper class. > > 2) Is there any getGraphics() is present in Lwuit which return > j2me Graphics instance, i haven't found it.I am using latest > release API (LWUIT_20080714) . > > Thanks > rajesh > [Message sent by forum member 'rjounwal' (rjounwal)] > > http://forums.java.net/jive/thread.jspa?messageID=292280 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net > For additional commands, e-mail: users-help@lwuit.dev.java.net >
Shai Almog http://lwuit.blogspot.com/
[att1.html]
|
|
|
|
|
|
|
|
Re: canvas instance into LWUIT form
Posted:
Aug 11, 2008 7:54 AM
in response to: Shai Almog
|
|
|
Thanks Shai, Ya it's work....
If i would like to do use that following same code into LWUIT then what i will have to do?
Display.getDisplay(this).setCurrent(new Canvas());
rajesh
|
|
|
|
|
|
|
|
Re: canvas instance into LWUIT form
Posted:
Aug 11, 2008 7:58 AM
in response to: rjounwal
|
|
|
|
|
Hi Rajesh, I don't quite understand the question.
> Thanks Shai, > Ya it's work.... > > If i would like to do use that following same code into LWUIT then > what i will have to do? > > Display.getDisplay(this).setCurrent(new Canvas()); > > > rajesh > [Message sent by forum member 'rjounwal' (rjounwal)] > > http://forums.java.net/jive/thread.jspa?messageID=292597 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@lwuit.dev.java.net > For additional commands, e-mail: users-help@lwuit.dev.java.net >
Shai Almog http://lwuit.blogspot.com/
[att1.html]
|
|
|
|
|