×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Aug 2006
    Location
    Calgary,Alberta,Canada
    Posts
    78

    Can not extend the Layer class

    I cannot extend the Layer class in the game api because its constructor is protected. Does anybody have a clue why it is so??

  2. #2
    Super Contributor
    Join Date
    Dec 2005
    Location
    Europe/Poland/Warsaw
    Posts
    1,697

    Re: Can not extend the Layer class

    hi,

    to force us to extends Layer subclasses like Sprite or TiledLayer,
    /**
    * Creates a new Layer with the specified dimensions.
    *
    * This constructor is declared package scope to
    * prevent developers from creating Layer subclasses

    *
    * By default, a Layer is visible and its upper-left
    * corner is positioned at (0,0).
    * @param width The width of the layer, in pixels
    * @param height The height of the layer, in pixels
    *
    */
    hth,
    regards,
    Peter

Similar Threads

  1. need information about j2me polish
    By rathikathangaraj in forum Mobile Java General
    Replies: 4
    Last Post: 2007-12-19, 09:01
  2. Replies: 2
    Last Post: 2007-03-14, 17:15
  3. 21 errors in j2me , help in soving them
    By abhishek_1211 in forum General Messaging
    Replies: 0
    Last Post: 2006-04-01, 09:04
  4. How to extend Image class
    By davidmanpearl in forum Mobile Java Media (Graphics & Sounds)
    Replies: 1
    Last Post: 2006-02-14, 08:37
  5. Exceptions while loading application
    By avinash_rs in forum Mobile Java General
    Replies: 0
    Last Post: 2003-06-09, 10: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
  •  
×