The strange behavior of the LWUIT dialog when using Dialog.showPacked () with BorderLayout.CENTER.

I use LWUIT for the 40 series to build my J2ME application, and I noticed the strange behavior of the LWUIT-Dialog when using the showPacked () method, whose dialog box is located with BorderLayout.CENTER.

This is especially important in touch phones.

I attached an image to describe my situation.

Image link

Initially, a dialog box appears, as shown in the first part of the image. However, over the next few seconds, it expands to become similar to the one shown in the second part of the image.

Future calls to display a dialog using showPacked appear as the third. I do not know why this is happening. I want my dialogue to appear as shown in the first half of the image all the time. I was wrong?

Note. The contents of the dialog box are an animated label.

+5
source share
2 answers

I have no idea what the guys were doing there, but I think they are setting the interface too aggressively. Try installing Dialog.setAutoAdjustDialogSize(false)and see if it solves your problem.

+1
source

You can remove the title and background and others. with the code below, it only does your animated GIF show with a darkened dialog background:

setTitle(" ");
setUIID("Null");
setDialogUIID("Null");
getStyle().setBgTransparency(0);
getSelectedStyle().setBgTransparency(0);
getUnselectedStyle().setBgTransparency(0);
getPressedStyle().setBgTransparency(0);
getDialogStyle().setBgTransparency(0);
+1
source

All Articles