Results 1 to 3 of 3

Thread: [RESOLVED] Draw Image (Mobile Edition)

Threaded View

  1. #1

    Thread Starter
    Member RaZeR's Avatar
    Join Date
    Jan 2009
    Location
    Russia, Moscow
    Posts
    38

    Resolved [RESOLVED] Draw Image (Mobile Edition)

    Hi
    I have started learning Java for mobile, i have make some simple programs (ReverseText, Calculator, BoxMove, DiscoLight), and now i want to create simple game.
    I'm need to draw image on canvas, in paint(Graphics g) void. I have tested g.drawImage, but it says that i using a null pointer
    How to initialize Image object and draw that to canvas?

    Some time later...
    Okay, i fixed it!
    Code:
    g.drawImage(Image.createImage("/redball.png"),0 , 0, Graphics.TOP | Graphics.LEFT);
    Last edited by RaZeR; Aug 16th, 2009 at 01:51 PM.
    VB 6, VB.NET, C#, Java, JavaME, C/C++ and Assembler Programmer


    If my post was helpful, rate me

Posting Permissions

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



Click Here to Expand Forum to Full Width