×

Discussion Board

Results 1 to 13 of 13

Thread: Form() J2me

  1. #1
    Registered User
    Join Date
    Nov 2008
    Posts
    47

    Form() J2me

    Code:
    public void paint(Graphics g) {
            clearScreen(G);
            form= getForm();
            display.setCurrent(form);
            g.setColor(0xFFFFFF);
            
            g.fillRect(60,100,getWidth(),getHeight());
            alice.setRefPixelPosition(60,100);
            alice.nextFrame();
            alice.paint(g);
        }
    Hi, according to my codes, i append my form first on the canvas and then the following of threading codes, but my threading image does not appear as my form overlap the whole rectangle.

    Is there a way for me to resize the form to a smaller size?


    Thanks in advance.
    Last edited by intheworldofmyown; 2008-11-28 at 06:50. Reason: codes minor error edit and change

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

    Thumbs up Re: Form() J2me

    Quote Originally Posted by intheworldofmyown View Post
    Code:
    public void paint(Graphics g) {
            clearScreen(G);
            form= getForm();
            display.setCurrent(form);
            g.setColor(0xFFFFFF);
            
            g.fillRect(60,100,getWidth(),getHeight());
            alice.setRefPixelPosition(60,100);
            alice.nextFrame();
            alice.paint(g);
        }
    Hi, according to my codes, i append my form first on the canvas and then the following of threading codes, but my threading image does not appear as my form overlap the whole rectangle.

    Is there a way for me to resize the form to a smaller size?


    Thanks in advance.
    Hi,
    I will first ask that what is the need of having the form and image parallel to each.I .Do not understand it..
    if you need to draw the image then ..draw the same...why form comes in to the light..

    However the form can not be resize...it is the device dependent.
    Thanks,
    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
    Nov 2008
    Posts
    47

    Re: Form() J2me

    cause i want allow the user to choose the the size from the choiceGroup that can be only appended in the form. Thus, the form is needed. Once the user select the size, the animation image will change according to user choice and show the animation on the same page

  4. #4
    Super Contributor
    Join Date
    Apr 2007
    Posts
    2,708

    Re: Form() J2me

    oke,
    i think there is some problem regarding the communication/choice of words...
    u havent actually appended a Form onto the canvas, u created a canvas and u created a form (with a choicegroup)... thjose are two seperate entities which both are inheriting from the Displayable object...
    MIDP can only show one Displayable at a time, so when u say :
    display.setCurrent(form);
    u are actually telling j2me to switch from ur canvas to ur form... thats why it will use ur whole screen, because its not like the form is appended onto ur canvas but it actually completely replaces it...
    so to be short u can show the canvas OR the form with the choicegroup, u cant actually rescale Form AND show it on top of the Canvas...
    As I stated in the other thread of urs, what u can do is to make ur own implementation of a choicegroup in the canvas itself...

  5. #5
    Registered User
    Join Date
    Nov 2008
    Posts
    47

    Re: Form() J2me

    hI Tiger79 , but i want to allow a user to make choice of the size of the character on the canvas. beside choicegroup any way can be done on a canvas?

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

    Thumbs up Re: Form() J2me

    Hi,
    You mean to say is that you will first take the input for the size of the image....correct..

    Yes off course this can be done without the choicegroup...you can simply draw the menu like screen then let the user select out of the same,have the selection of the size..in a int var..then draw the images..
    for any more query you can write again..
    Thanks,
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  7. #7
    Registered User
    Join Date
    Nov 2008
    Posts
    47

    Re: Form() J2me

    Hi, is there any example of your menu like screen? cause i dun understand that part

    Thank you and sorry for the trouble

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

    Thumbs up Re: Form() J2me

    Hi,
    but i want to allow a user to make choice of the size of the character on the canvas
    How many sizes you can allow the user can choose,
    Thanks,
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  9. #9
    Super Contributor
    Join Date
    Apr 2007
    Posts
    2,708

    Re: Form() J2me

    just use ur canvas or whatever to show whatever u want to show...
    then add a command to it (and the commandlistener interface to interact with the command) with some terxt on it like "select Font Size"...
    when the user uses that command u switch ur display to ur form containing the choicegroup.. when the user selects the font size/type, u change the Font in the canvas and then u switch back to the canvas...
    done

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

    Thumbs up Re: Form() J2me

    Hi
    I ask to you that how many sizes of player you gonna provide to the user..to choose..
    Like
    @ 20x20,
    @ 30x30,
    @ 40x20 and so on..
    please provide the information..then only I can help you,
    Thanks,
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  11. #11
    Nokia Developer Champion
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,406

    Re: Form() J2me

    Hi,

    check out this Wiki article for some ideas on how to build a Canvas based selection screen:

    http://wiki.forum.nokia.com/index.ph...ist_in_Java_ME

    Hope it helps,
    Pit

  12. #12
    Registered User
    Join Date
    Jun 2009
    Posts
    1

    Re: Form() J2me

    Hi,
    if we went to display tow form in application,one for image and the second for video.
    think's

  13. #13
    Super Contributor
    Join Date
    Apr 2007
    Posts
    2,708

    Re: Form() J2me

    at the same time ?
    as in one near to other ?
    well then you would have two displayables (the two Forms) but j2me only supports to show (draw) one displayable at a time...

Similar Threads

  1. Create 3GP player with J2ME for Mobile
    By dexxa05 in forum Mobile Java Media (Graphics & Sounds)
    Replies: 57
    Last Post: 2012-01-10, 11:44
  2. MultiPage Form Problem
    By kumar_sai123 in forum Symbian User Interface
    Replies: 3
    Last Post: 2008-09-02, 07:22
  3. Form creating strategy
    By alav in forum Symbian User Interface
    Replies: 1
    Last Post: 2008-03-09, 20:45
  4. Cannot create form
    By Norrit_ in forum Symbian User Interface
    Replies: 1
    Last Post: 2006-03-08, 15:21
  5. need urgent guidance on j2me
    By cogni_niru in forum Mobile Java General
    Replies: 1
    Last Post: 2005-11-13, 15:02

Posting Permissions

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