×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Feb 2010
    Posts
    5

    Unhappy null in paint method of layer manager

    sorry for posting in wrong section, but its urgent and I think more people are involved into this section that's why im posting.

    while developing one strategy game , in the later rounds I get null pointer exception in the layermanager.paint method.
    below is the code

    Code:
    if(g==null){
            System.out.println("new graphics");
             g=getGraphics();
          }
        if(layerManager==null){
             System.out.println("new layer manager");
             layerManager=new LayerManager();
         }
        layerManager.paint(g, 0, 0);
    even if I create new objects of graphics and layer manager in case if they are null. I am getting null pointer in paint method. what can be the reason
    can somebody give some suggestions.
    http://www.sgadhvi.blogspot.com/

  2. #2
    Nokia Developer Expert
    Join Date
    Aug 2007
    Posts
    1,595

    Re: null in paint method of layer manager

    Original discussion takes place here: http://discussion.forum.nokia.com/fo...d.php?p=743306

    Regards,
    r2j7
    [URL="http://library.forum.nokia.com/java"][B] >>> Java Developer's Library <<<[/B][/URL]
    [URL="https://www.developer.nokia.com/Resources/Support/Technical_support.xhtml"] [B]>>> Technical Support for Java ME development <<<[/B][/URL]
    [URL="https://publish.ovi.com/info/"][B]>>> Nokia Publish: reach millions of Nokia users worldwide through Nokia Store <<<[/B][/URL]

Similar Threads

  1. Leaking memory when setting SVGMenu to null
    By GuusDavidson in forum Mobile Java Media (Graphics & Sounds)
    Replies: 0
    Last Post: 2008-07-15, 06:12
  2. Repaint calls ignored in paint method on S40
    By sam.hendley in forum Mobile Java Media (Graphics & Sounds)
    Replies: 5
    Last Post: 2003-07-26, 06:45
  3. Layer manager method in MIDP 2.0
    By spalomo in forum Mobile Java General
    Replies: 0
    Last Post: 2003-07-02, 09:47
  4. Layer Manager remove method
    By spalomo in forum Mobile Java Media (Graphics & Sounds)
    Replies: 0
    Last Post: 2003-07-02, 08:33

Posting Permissions

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