Search code examples
java-memidplcdui

How to change the height and width of the table (javax.microedition.lcdui.CustomItem) inside the form in J2ME


I create a table in j2me.Using javax.microedition.lcdui.CustomItem by drawing lines & placing a string.Then i place the table inside the form (javax.microedition.lcdui.Form).

I also implement traversing using the method

protected boolean traverse(int dir, int viewportWidth, int viewportHeight, int[] visRect_inout){}

Here I want to do when traversing is fails I place the new table after deleting the old table inside the form. Or I want to change the contents in the table and also change the height and width of the table inside form.


Solution

  • The solution I got: Delete the table from the form then create a new table by creating an object & add into the form.

    In the constructor of table get the form's height & width as an argument then adjust the size of the new table based on the form's dimensions.