Skip to main content

java.awt.Choice, item height issue

11 replies [Last post]
jldominguez
Offline
Joined: 2008-01-02

Hello. Just to report a little issue with java.awt.Choice:

https://correo.prodevelop.es/descarga/mobile/choice_issue/four_items.jpg

The code is this:

public static void main(String[] args) {
f = new TheFrame();
f.setVisible(true);
}

==================

public class TheFrame extends Frame {

private Choice aChoice;
private Panel aPanel;

public TheFrame() {

aPanel = new Panel();
aPanel.setLayout(null);

aChoice = new Choice();
aChoice.add("ITEM ONE");
aChoice.add("ITEM TWO");
aChoice.add("ITEM THREE");
aChoice.add("ITEM FOUR");
aChoice.setBounds(20, 20, 120, 25);

aPanel.add(aChoice);

setLayout(new BorderLayout());
add(aPanel);
}
}

Reply viewing options

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

On Saturday 20 September 2008, Hinkmond Wong wrote:
> phonemeadvanced@mobileandembedded.org wrote:
> > Sorry, I forgot to mention: that's Personal Profile, b86, on Windows
> > Mobile 2003.
>
> That's probably for Davy.
>
> Do you have a screenshot of what it looks like?
>
> Hinkmond

I have seen the screenshot and noticed the font size issue. However, the test
code you provided works fine on my device.

Lucas: Could it be that your device does not have a 320x240 resolution?

I am guessing it has a 640x480 resolution, and that for some reason the wrong
font heights are used to compute the height of the drop down box of the
choice widget. It should be twice as high. Some other people have had font
issues when running pMEA in a resolution other than QVGA (320x240).

The problem is that I cannot reproduce the issue or test a fix as I do not
have another device with a bigger resolution to test with.

Davy

---------------------------------------------------------------------
To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
For additional commands, e-mail: advanced-help@phoneme.dev.java.net

jldominguez
Offline
Joined: 2008-01-02

Yes, you are right, it looks like that on our two pocket pcs with 192 dpi (480x640 pixels) and looks ok in our pocket pc with 96 dpi (240x320 pixels)

Regards,
Lucas

jldominguez
Offline
Joined: 2008-01-02

Davy has solved the choice height issue in b91. We are using the WM2003 version in all devices and looks good also for DPI = 192.

Thanks,
Lucas

jaccas123
Offline
Joined: 2010-11-03

Hi,
I am having the same problem. I am using the java.awt.Choice component (from Java 2 Platform SE v 1.4.2) on Windows mobile 6.5, but on trying to select an entry in the drop down the entries are all merged into one another. I know that this is due to the device having a 192 DPI display instead of a 96 DPI display and that the Choice component will require to be scaled, but I am not sure how to do this or if it's even possible. Can you detail how you resolved the problem with the choice height?

Hinkmond Wong Guest
Offline
Joined: 2010-11-03

On 11/3/2010 6:46 AM, noreply@java.net wrote:
> Hi,
>
> I am having the same problem. I am using the java.awt.Choice component
> (from
> Java 2 Platform SE v 1.4.2) on Windows mobile 6.5, but on trying to
> select an
> entry in the drop down the entries are all merged into one another. I
> know
> that this is due to the device having a 192 DPI display instead of a
> 96 DPI
> display and that the Choice component will require to be scaled, but I
> am not
> sure how to do this or if it's even possible. Can you detail how you
> resolved
> the problem with the choice height?

Did you try Davy's build b91 or greater (Ex. currently b168)?

See:
http://davy.preuveneers.be/phoneme/?q=node/10

If not, what is the build # where you still see the problem.

Thanks,
Hinkmond

274 Guest
Offline
Joined: 2010-11-04

There are indeed a few issues with the Windows Mobile 6 build when you run it
on a (W)VGA Windows Mobile 6.5. I don't have any issues with the Choice boxes
in my latest builds. One issue I did notice is that the font size in a menu
is only half the size it should be (at least in the emulator), but stylus
events are interpreted as if the text in the menu was shown at appropriate
size. I don't have this problem with the Windows Mobile 6.1 emulator. Davy

davyp
Offline
Joined: 2007-01-03

There are indeed a few issues with the Windows Mobile 6 build when you run it on a (W)VGA Windows Mobile 6.5.I don't have any issues with the Choice boxes in my latest builds.
One issue I did notice is that the font size in a menu is only half the size it should be (at least in the emulator), but stylus events are interpreted as if the text in the menu was shown at appropriate size. I don't have this problem with the Windows Mobile 6.1 emulator.
Davy

jldominguez
Offline
Joined: 2008-01-02

Sorry, I forgot to mention: that's Personal Profile, b86, on Windows Mobile 2003.

Thanks,
Lucas

Hinkmond Wong

phonemeadvanced@mobileandembedded.org wrote:
> Sorry, I forgot to mention: that's Personal Profile, b86, on Windows Mobile 2003.
>

That's probably for Davy.

Do you have a screenshot of what it looks like?

Hinkmond

---------------------------------------------------------------------
To unsubscribe, e-mail: advanced-unsubscribe@phoneme.dev.java.net
For additional commands, e-mail: advanced-help@phoneme.dev.java.net

jldominguez
Offline
Joined: 2008-01-02
hinkmond
Offline
Joined: 2003-12-01

That link: https://correo.prodevelop.es/descarga/mobile/choice_issue/four_items.jpg doesn't seem to work. Do you have another link or has this issue been resolved?

Thanks,
Hinkmond