×

Discussion Board

Results 1 to 11 of 11
  1. #1
    Registered User
    Join Date
    Jun 2009
    Posts
    19

    How to create a login screen using S60 5th Ed SDK and Netbeans

    I am new to mobile programming and I need to start with a simple login screen.
    Can anyone please tell me how to create a login screen using S60 5th Ed SDK for java and Netbeans?

    I referred following link
    http://www.netbeans.org/kb/60/mobility/loginscreen.html

    But I get following error on trying to run on emulator:

    MIDlet: LoginScreenExample
    Exception in handleDisplayableEvent. Reason: NullPointerException
    source is : org.netbeans.microedition.lcdui.LoginScreen@7f487f48
    p0 is : 360
    p1 is : 240
    p2 is : 0
    java.lang.NullPointerException
    at org.netbeans.microedition.lcdui.LoginScreen.computeMetrics(Unknown Source)
    at org.netbeans.microedition.lcdui.LoginScreen.sizeChanged(Unknown Source)
    at javax.microedition.lcdui.Displayable.sizeChangedEvent(Displayable.java:263)
    at javax.microedition.lcdui.Canvas.sizeChangedEvent(Canvas.java:755)
    at javax.microedition.lcdui.Displayable.handleEvent(Displayable.java:163)
    at javax.microedition.lcdui.Canvas.handleEvent(Canvas.java:644)
    at javax.microedition.lcdui.Toolkit.handleDisplayableEvent(Toolkit.java:483)
    at com.symbian.lcdjava.lang.SystemExtensions._dispatchCallbacks(Native Method)
    at com.symbian.lcdjava.lang.SystemExtensions.dispatchCallbacks(SystemExtensions.java:35)
    at com.symbian.midp.runtime.KVMEventProcessor.run(KVMEventProcessor.java:23)


    Please help.

  2. #2
    Regular Contributor
    Join Date
    Dec 2008
    Posts
    106

    Re: How to create a login screen using S60 5th Ed SDK and Netbeans

    Just create your own. It is really simple. First of all, you will need to create 2 text fields and add them to your form.
    The login textfield should look like
    Code:
    TextField loginfield = new TextField("Login", "", LOGIN_MAXSIZE, TextField.ANY);
    And password field should be like
    Code:
    TextField passfield = new TextField("Password", "", PASSWORD_MAXSIZE, TextField.PASSWORD);
    Your exception doesn't provide enough information. Post your code here and provide more details.
    Last edited by Unit1ed; 2009-06-04 at 01:42.

  3. #3
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Re: How to create a login screen using S60 5th Ed SDK and Netbeans

    Hi,
    Unit1ed is correct,you can just write the own code.He has given the hint.Just add the two text fields,on the form.moreover you can add the two commands too.The action of the commands you can handle in the commandAction() method.
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  4. #4
    Registered User
    Join Date
    Jun 2009
    Posts
    19

    Re: How to create a login screen using S60 5th Ed SDK and Netbeans

    Thanks for help. One more question..
    Can we modify code generated through UI Designer in Visual Midlet while using NetBeans?

  5. #5
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Re: How to create a login screen using S60 5th Ed SDK and Netbeans

    Quote Originally Posted by AppTest View Post
    Thanks for help. One more question..
    Can we modify code generated through UI Designer in Visual Midlet while using NetBeans?
    Hi,
    Why do not you go and create some GUI.Then try to delete the generated code.I tried it and I was unable to delete the same,
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  6. #6
    Regular Contributor
    Join Date
    Dec 2008
    Posts
    106

    Re: How to create a login screen using S60 5th Ed SDK and Netbeans

    Quote Originally Posted by AppTest View Post
    Thanks for help. One more question..
    Can we modify code generated through UI Designer in Visual Midlet while using NetBeans?
    Yes, you can modify it by right clicking on your visual form in netbeans and choosing "Go To Source" option. You won't be able to modify generated code though, just adding your own at provided spaces. I highly do not recommend that, since it seems that you are new to J2ME and it may cause you lots of pain working with existing code. Just look at some basic examples or tutorials and start writing your own code, UI is really easy.

  7. #7
    Registered User
    Join Date
    Jun 2009
    Posts
    1

    Re: How to create a login screen using S60 5th Ed SDK and Netbeans

    Hi all

    I encountered the same problem and discovered that similar problem occurred for SMSComposer. The problem occurred for both S60 and latest N97 Emulators. However, the problem did not occur for using SUN wireless tookkit emulator and the samples run smoothly. I doubt it is bug of the S60/N97 emulator.

    P.S. I just downloaded the sources from Netbeans and tested with them.

  8. #8
    Registered User
    Join Date
    Nov 2010
    Location
    bangalore
    Posts
    21

    Re: How to create a login screen using S60 5th Ed SDK and Netbeans

    can you solved this problem, I have same this one.........
    can you help me...........

  9. #9
    Registered User
    Join Date
    Nov 2010
    Location
    bangalore
    Posts
    21

    Re: How to create a login screen using S60 5th Ed SDK and Netbeans

    MIDlet: TECMidlet
    Exception in handleDisplayableEvent. Reason: NullPointerException
    source is : com.TrackEveryCoinCanvas@76637663
    p0 is : 0
    p1 is : 0
    p2 is : 0
    java.lang.NullPointerException
    at com.TrackEveryCoinCanvas.paint(Unknown Source)
    at javax.microedition.lcdui.Canvas.paint(Canvas.java:464)
    at javax.microedition.lcdui.Canvas.handlePaint(Canvas.java:402)
    at javax.microedition.lcdui.Canvas.handleEvent(Canvas.java:579)
    at javax.microedition.lcdui.Toolkit.handleDisplayableEvent(Toolkit.java:483)
    at com.symbian.lcdjava.lang.SystemExtensions._dispatchCallbacks(Native Method)
    at com.symbian.lcdjava.lang.SystemExtensions.dispatchCallbacks(SystemExtensions.java:35)
    at com.symbian.midp.runtime.KVMEventProcessor.run(KVMEventProcessor.java:23)
    -VM verbose connection exited

    This is the error how solve it is......

  10. #10
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Re: How to create a login screen using S60 5th Ed SDK and Netbeans

    Check the difiniation of the method of handleDisplayableEvent, the event you doing here, the target on which you might b performing the action is null,
    put the System.out.println's and try to find the exact line of the exception.
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  11. #11
    Registered User
    Join Date
    Nov 2010
    Location
    bangalore
    Posts
    21

    Re: How to create a login screen using S60 5th Ed SDK and Netbeans

    handleDisplayableEvent method not present in com.TrackEveryCoinCanvas class....

Similar Threads

  1. E70 + Netbeans + S60 SDK --> failed to initialize session
    By impesa in forum Mobile Java Tools & SDKs
    Replies: 6
    Last Post: 2012-07-13, 22:04
  2. Help to run sample app included in S60 5th Ed SDK
    By AppTest in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2009-06-02, 07:27
  3. S60 5th ed. emulator installation
    By afsheen in forum Mobile Java Tools & SDKs
    Replies: 9
    Last Post: 2009-04-18, 08:33
  4. NetBeans IDE 6.0 + S60 3rd Ed. SDK FP1
    By hw in forum Mobile Java Tools & SDKs
    Replies: 6
    Last Post: 2008-12-28, 15:36
  5. Problem with NetBeans 5.5 + S60 3rd Ed. SDK
    By maggot84 in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2007-05-08, 23:29

Posting Permissions

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