Skip to main content

form.append is not allowed

1 reply [Last post]
tsurendra
Offline
Joined: 2008-07-08

i have a custom component that i am trying to "Append" to a LWUIT form , below is the declaration & integration code

sample Code that works well in another J2ME NON-LWUIT application, sample code below:

chartCanvas=new J2meViewer(null);
createDefaultChart(); // chart creation successful
mainForm.append(chartCanvas); // added successfully in window

public class J2meViewer extends CustomItem implements ChartListener {
... }

public interface ChartListener {
... }

In LWUIT first two are running fine
chartCanvas=new J2meViewer(null); // successful
createDefaultChart(); // successful
mainForm.append(chartCanvas); // PROBLEM AREA

Since form is derived from com.sun.lwuit.form above "append" is not allowed.

Can you suggest any other way to achieve it, maybe in a container in the tabbed pane etc?

pl advice.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Shai Almog

Hi,
LWUIT is not MIDP high level UI and append will not work for you with
LWUIT.
In order to leverage LWUIT you will need to adapt your GUI code to
use it, please refer to the ample tutorials & included developer
guide both from Sun and 3rd parties:

http://lwuit.dev.java.net/tutorial/index.html
http://www.developer.com/ws/article.php/10927_3759471_1
http://www.devx.com/wireless/Article/38461?trk=DXRSS_LATEST
https://lwuit.dev.java.net/files/documents/8797/95067/file_95067.dat/
LWUIT%20Developer_Guide.pdf
http://developers.sun.com/learning/javaoneonline/2008/pdf/TS-4921.pdf
http://lwuit.blogspot.com/

Thanks,
Shai.

> i have a custom component that i am trying to "Append" to a LWUIT
> form , below is the declaration & integration code
>
> sample Code that works well in another J2ME NON-LWUIT
> application, sample code below:
>
> chartCanvas=new J2meViewer(null);
> createDefaultChart(); // chart creation successful
> mainForm.append(chartCanvas); // added successfully in window
>
> public class J2meViewer extends CustomItem implements
> ChartListener {
> ... }
>
> public interface ChartListener {
> ... }
>
>
> In LWUIT first two are running fine
> chartCanvas=new J2meViewer(null); // successful
> createDefaultChart(); // successful
> mainForm.append(chartCanvas); // PROBLEM AREA
>
> Since form is derived from com.sun.lwuit.form above "append" is not
> allowed.
>
> Can you suggest any other way to achieve it, maybe in a container
> in the tabbed pane etc?
>
> pl advice.
> [Message sent by forum member 'tsurendra' (tsurendra)]
>
> http://forums.java.net/jive/thread.jspa?messageID=287809
>
> ---------------------------------------------------------------------
> 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]