Results 1 to 3 of 3

Thread: J2ME and files

  1. #1
    bartosz666 is offline Member
    Join Date
    Jan 2008
    Posts
    4
    Rep Power
    0

    Default J2ME and files

    after I launch netbeans' mobile phone emulator and choose the middlet to execute in the emulator screen I got a question if I wish to execute a 'reading' operation on file. When I click 'Yes' the program instead of reading the file - immidiately ends working and comes back to midlet list... and the requested read of file and printing its conent doesn work...

    below is the code:
    Last edited by bartosz666; 07-12-2008 at 03:23 AM.

  2. #2
    hobbyist is offline Member
    Join Date
    Nov 2007
    Posts
    5
    Rep Power
    0

    Default

    I just had a quick read of your code and I do not see an instantiation of a TextBox object. So I guess the problem is that your TextBox object is null being returned from get_helloForm() method. In fact you are returning the global object helloTextBox which has not been instantiated. I think you should look to see if you are getting a nullPointerException.

  3. #3
    hobbyist is offline Member
    Join Date
    Nov 2007
    Posts
    5
    Rep Power
    0

    Default

    Somewhere in your code you need:
    helloTextBox = new TextBox(String title, String contents, int size, int type);

    In your initialise() method you are:
    getDisplay().setCurrent(get_helloForm());

    I think that a null is being returned from get_helloForm() so a nullPointerException will be thrown when you try to setDisplay() in your initialize() method.

Similar Threads

  1. Servlets with J2ME
    By Daniel in forum CLDC and MIDP
    Replies: 2
    Last Post: 05-27-2008, 06:56 PM
  2. J2me
    By kuttyniti@gmail.com in forum Sun Java Wireless Toolkit
    Replies: 0
    Last Post: 11-24-2007, 07:27 AM
  3. J2ME Webcam 0.1
    By JavaBean in forum Java Software
    Replies: 0
    Last Post: 10-31-2007, 06:25 PM
  4. J2ME ChartComponent 1.5
    By JavaBean in forum Java Software
    Replies: 0
    Last Post: 07-01-2007, 10:20 AM
  5. Fire j2me 1.2
    By JavaBean in forum Java Software
    Replies: 0
    Last Post: 06-22-2007, 12:46 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •