Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4046738
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T13:36:09+00:00 2026-05-20T13:36:09+00:00

The following runs ok and pops up a text field that I can type

  • 0

The following runs ok and pops up a text field that I can type into. The top left soft key on the phone emulator lets me change the input type (from qwerty to numeric etc.) however every time I press this top left button I get a NullPointerException. This seems to happen with any Midlet running with this softkey (assigning a command with a higher priority to the softkey pushes the input type display over to the top right one, where it works fine!)

I’m a bit confused, is there something obvious I’m missing here (likely) or is there a bug / feature somewhere that I’m completely missing? I’m using Netbeans 6.9.1 on Windows XP.

public class Midlet extends MIDlet {

    private Display display;

    public void startApp() {
        display = Display.getDisplay(this);

        display.setCurrent(new Form("") {
            {
                append(new TextField("Label", "", 10, TextField.ANY));
            }
        });
    }

    public void pauseApp() {
    }

    public void destroyApp(boolean destroy) {
    }
}

EDIT: Whoops, forgot stack trace:

TRACE: <at java.lang.NullPointerException:   0>, Exception caught in Display class
java.lang.NullPointerException:   0
        at javax.microedition.lcdui.Display$ChameleonTunnel.callItemListener(), bci=57
        at com.sun.midp.chameleon.layers.SoftButtonLayer.processCommand(), bci=57
        at com.sun.midp.chameleon.layers.SoftButtonLayer.soft1(), bci=37
        at com.sun.midp.chameleon.layers.SoftButtonLayer.keyInput(), bci=36
        at com.sun.midp.chameleon.CWindow.keyInput(), bci=38
        at javax.microedition.lcdui.Display$DisplayEventConsumerImpl.handleKeyEvent(),     bci=17
        at com.sun.midp.lcdui.DisplayEventListener.process(), bci=277
        at com.sun.midp.events.EventQueue.run(), bci=179
        at java.lang.Thread.run(Thread.java:662)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T13:36:10+00:00Added an answer on May 20, 2026 at 1:36 pm

    It is behaving same in my emulator when I use JAVA ME SDK 3.0.

    But when I use Sun Java WTK 2.5.2 sdk there is even no ‘change input type button’.

    I checked the code in real device Nokia 5310 Music express. It seems to work fine i.e I can change input type, t9 prediction on, more input symbols etc.

    That is the change input type button is implementation dependent and behaving differently. In the case of java me sdk 3.0 it may be a bug.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Why the following code runs so.... slow....... ? <html><body><script type=text/javascript> var i = 0;
I have a build process that does the following: Runs TLBIMP on a number
I have the following query that runs in my Oracle database and I want
I have the following script that runs when a user clicks a link that
I have the following SQL code that runs against a Change Request database. Each
I've a thread that runs following tcpConnect method. I wish to stop it at
Can anybody explain to me why the following sub on the development machine runs
I get an Object Required error message when the following code runs. Can any
Can an NSArray hold an array of bool values? The following code runs BOOL
The following code runs without any errors but doesn't actually delete anything: $update =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.