In my j2me App I have tried canvas which works great on Nokia phone but doesn't run on samsung. For that I have to switch to some FORM which in both cases works but only issue is of size, if I create smaller image to fit for both phone screens, one (samsung) shows that ok but other (nokia) leaves a lot more space and vice versa.
I need to have code that could stretch my image and just fix if to the screen size which I basically get by form.getHeight() and form.getWidth() property. I wonder if there is property of Image.createImage(width, height) then why doesn't it stretch it to the value I provide?
my code for that is below
try {
System.out.println("Height: " + displayForm.getHeight());
System.out.println("Width: " + displayForm.getWidth());
Image img1 = Image.createImage("/bur/splashScreen1.PNG");
img1.createImage(displayForm.getHeight(), displayForm.getWidth());
displayForm.append(new ImageItem(null, img1, Item.LAYOUT_CENTER, null));
} catch (Exception ex) {
}
Image 
Parameters in this method have nothing to do with stretching, see API javadocs:
Imageclass (API javadocs) has two morecreateImagemethods that use parameters called "width" and "height" - one with six, another with four arguments but none of these has anything to do with stretching.In
createImagewith six arguments, width and height specify size of the region to be copied (without stretching) from source image.In method with four arguments, width and height specify how to interpret source ARGB array, without these it would be impossible to find out if, say, array of
12values represents3x4image or4x3. Again, this has nothing to do with stretching.