Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Dec 8th, 2006, 8:55 AM   #1
Nim_
Newbie
 
Join Date: Jun 2006
Location: Secret
Posts: 8
Rep Power: 0 Nim_ is on a distinguished road
Send a message via MSN to Nim_
midlet-j2me

I'm using Netbeans IDE 5.5 with mobility pack and I'm making a midlet application.

I have a main form with an "ok" button returning to itself.
I have added on form, an imageItem1 on which i haven't put any default image. ( image = none)
i have added an image item(image1)

As you can see, I'm trying to add the image1 on imageItem1 when the flag boolean is true and dissapear it if not.. It just doesn't work..no errors:

 if (displayable == helloForm) {
             if (command == exitCommand) {
                           // Insert pre-action code here
                 exitMIDlet();
                          // Insert post-action code here
           } else if (command == okCommand1) {
                         // Insert pre-action code here

                getDisplay().setCurrent(get_helloForm());
                       // Insert post-action code here  

                     if(flag == true){
                      imageItem1.setImage(image1);
                      flag = false;
                     }
                     else{
                       imageItem1.setImage(null);
                       flag = true;
                     }              
            }
        }
It doesnt work even without the "if" process.. leaving only the:
imageItem1.setImage(image1);

any solutions?
Nim_ is offline   Reply With Quote
Old Dec 9th, 2006, 8:41 PM   #2
Nim_
Newbie
 
Join Date: Jun 2006
Location: Secret
Posts: 8
Rep Power: 0 Nim_ is on a distinguished road
Send a message via MSN to Nim_
ok, I finally manage to make it.. it was just because the code of the image1 hadn't have run.. so i had to run the method image1() before put the image in the imageItem1. ..
Nim_ is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
J2me Sengbasy Java 3 May 12th, 2006 2:12 PM
j2me Writlaus Java 3 Apr 12th, 2006 3:47 PM
J2ME network error xdev Java 2 Feb 12th, 2006 5:32 AM
Errors in microjava midlet freddielj Java 1 Apr 8th, 2005 11:02 AM
possible solutions for microjave freddielj Java 2 Apr 7th, 2005 9:50 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 11:46 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC