×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Jan 2013
    Posts
    9

    lwuit ContextMenu issue

    I have a crash, when I direct use ContexMenu.





    java.lang.NullPointerException
    at com.nokia.lwuit.components.ContextMenu.paintArrow(ContextMenu.java:93)
    at com.nokia.lwuit.components.ContextMenu.paint(ContextMenu.java:81)
    at com.sun.lwuit.Component.paintInternalImpl(Component.java:939)
    at com.sun.lwuit.Component.paintInternal(Component.java:914)
    at com.sun.lwuit.Component.paintInternal(Component.java:885)
    at com.sun.lwuit.Component.paintComponent(Component.java:1111)
    at com.sun.lwuit.Component.paintComponent(Component.java:1064)
    at com.sun.lwuit.impl.LWUITImplementation.paintDirty(LWUITImplementation.java:274)
    at com.sun.lwuit.Display.edtLoopImpl(Display.java:890)
    at com.sun.lwuit.Display.invokeAndBlock(Display.java:1047)
    at com.sun.lwuit.Display.invokeAndBlock(Display.java:1070)
    at com.sun.lwuit.Form.showModal(Form.java:1406)
    at com.sun.lwuit.Dialog.showModal(Dialog.java:1127)
    at com.sun.lwuit.Dialog.show(Dialog.java:544)
    at com.nokia.lwuit.components.ContextMenu.showImpl(ContextMenu.java:174)
    at com.nokia.lwuit.components.ContextMenu.show(ContextMenu.java:110)



    when I give an arrow icon constant named ContextMenuArrowLeftImage。 there is gap between arrow and menu . Can anyone show me how to fix it. Thanks very much

    Sometimes the menu background disappeared, Can anyone fix this issue. Thanks very much
    Last edited by phxzuo; 2013-02-07 at 06:12.

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

    Re: lwuit ContextMenu issue

    Is must be throwing some exception when going to crash. Try to debug using the IDE and see what the actual reason for the crash is.

    This is one sample for using the context menu:
    ContextMenu
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  3. #3
    Registered User
    Join Date
    Jan 2013
    Posts
    9

    Re: lwuit ContextMenu issue

    Thanks for your replay. I use the ContextMenu the same way as the ContextMenu demo. The actual reason is the lwuit lib 0.91 doesn't contain the arrow resource,And the Exception is thrown by lwuit lib. As I said,when I give a Arrow png to solve the exception, there is gap bewteen arrow and menu items. So I wish the lwuit future update will contain the arrow resource and paint perfect. Thanks

  4. #4
    Registered User
    Join Date
    Jan 2013
    Posts
    9

    Re: lwuit ContextMenu issue

    Maybe just use the lcdui context menu style is better

Similar Threads

  1. LWUIT S40 Dialog issue
    By Munon in forum Mobile Java Tools & SDKs
    Replies: 4
    Last Post: 2013-03-01, 13:17
  2. Opening a ContextMenu placed in another file
    By pavneetarora in forum [Archived] Qt Quick
    Replies: 5
    Last Post: 2012-02-20, 17:25
  3. simple LWUIT issue...?
    By kumar1234567 in forum Mobile Java General
    Replies: 2
    Last Post: 2011-04-15, 14:00
  4. Issue with LWUIT TableLayout..
    By lynxgeek in forum Mobile Java General
    Replies: 0
    Last Post: 2010-12-03, 07:05
  5. LWUIT Issue
    By giaviv in forum Mobile Java General
    Replies: 4
    Last Post: 2010-06-04, 16:53

Posting Permissions

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