×

Discussion Board

Results 1 to 2 of 2

Thread: image in form

  1. #1
    Regular Contributor
    Join Date
    Jun 2009
    Posts
    179

    image in form

    i have to show image and text in form like GUI object, how this can done using canvas class?

    thanks and regards
    Arunesh

  2. #2
    Registered User
    Join Date
    Dec 2009
    Posts
    5

    Re: image in form

    Maybe you need to override the method paint from a canvas (public void paint(Graphics g)), and use the object graphics for paint it using the method draw from a Graphics object.

    like this:

    public void paint(Graphics g)
    {
    Image img=new Image("/image.jpg");

    g.drawImage(img, 10, 10, Graphics.HCENTER|Graphics.VCENTER);


    }


    reference:
    http://java.sun.com/javame/reference...dui/Image.html
    http://java.sun.com/j2se/1.4.2/docs/.../Graphics.html

Similar Threads

  1. insert an image into a canvas
    By diegoves in forum Mobile Java Media (Graphics & Sounds)
    Replies: 5
    Last Post: 2009-09-30, 11:13
  2. load image problem
    By Pmarcoen in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2009-08-23, 06:19
  3. How to upload Image form FTP
    By pranay_preet in forum Symbian Networking & Messaging (Closed)
    Replies: 6
    Last Post: 2009-08-10, 09:08
  4. Nokia N-Series Complete Model Line-Up
    By Dopod in forum General Development Questions
    Replies: 6
    Last Post: 2008-07-22, 20:16
  5. Can we set background image for Form?
    By manojkumar.m in forum Mobile Java General
    Replies: 1
    Last Post: 2008-06-13, 15:01

Posting Permissions

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