Images in NetBeans 5.0 Mobility

Hi all,
I am an experienced programmer but new to Java. I want to learn how to program MIDlet's for mobile phones. I have installed NetBeans 5.0 and the NetBeans Mobility Pack for supporting mobile applications.
I have learned the basics like creating a MIDlet and a canvas. I can draw text to the canvas.
But what I can't do is to load an image and display it on screen. My problem is to include the image to my project. I think I have to use the Image class' createImage() method, but what should be the path of the image?
I also worked with KToolbar. There was a folder named res, where all the resource files where put into. But in the project of NetBeans, there is no res folder.
So I would be pleased, if you can help me with including images to project and displaying them on screen.
Thanks for help,
Regards.

Please post only Java language questions in these forums. They do not provide support for NetBeans (or other IDEs), you might try the NetBeans site mailing list.
If the code was not compiled with debugging enabled, then it can't be debugged.

Similar Messages

  • 320PPI  5cm x 5cm ,  and the mobile app that this image appear runs on a mobile phone of 200ppi disp

    IF I DO AN IMAGE in FW or PS of 320PPI  5cm x 5cm ,  and the mobile app that this image appear runs on a mobile phone of 200ppi display resolution, then resolution seem of image should be 200ppi ... in other words should adapt automatically????

    Only if you were to measure the physical dimentions. (Using physical dimentions and changing the ppi would add or remove pixels)
    inches X ppi = pixels
    A 1200 x 1600 pixel image will be the same on all devices that share that ratio, the ppi difference comes into play when the phyical size of the screen is changed.
    Technically the quality never changed only the zoom changed.
    When designing a screen at 1200x1600 (example) That image will fit on any screen that has that spec.
    The ratio plays a role when only 1 of the 2 pixel dimentions changes (width or the height).
    On larger screens, the ppi is lower to equal the same number of pixels. So when a device can support a higher resolution, the ppi is increased on the same size screen.
    Knowing that, having the specs of the device will tell you the maximum number of pixels that screen can display.
    Therefore, when designing a screen, always start with the largest resolution (pixel dimmentions) first, then downsample to the next size screen and so on.
    The reason is simple, it is easier to remove pixels, then it is to add them later, as photoshop or any other software does not know what should be there.
    BTW, this is also the reason why you can change the pixel dimentions in the save for web dialog box and not the physical size or ppi. To make it easy to reduce the pixel dimentions.

  • Image cache problem in win mobile profile

    I've done an application which periodically reloads and shows an image from a web server because the image is also changing periodically. In applet and desktop profile the image reloads properly but in mobile profile the image only loads once and doesnt change in spite of the image is still changing in the web server.
    I supose this is happening because in mobile profile the image might get saved in cache although the aplication keeps asking the image to reload.
    I need the image to reload!!
    can anybody help me??
    here´s the source code:
    //this is the image by default
    var image: Image = Image{
    url: “{__DIR__}images/nodisponible2.jpg”;
    var cam: ImageView = ImageView {
    cache:false
    translateY:72;
    translateX:9;
    fitWidth:223;
    preserveRatio:true;
    image: imagen
    //a timeline calls a periodically a function that reloads the image
    var timeline: Timeline = Timeline{
    repeatCount: Timeline.INDEFINITE
    keyFrames:[
    KeyFrame{
    time : 0.25s
    action : renovarUrl
    //each time you call this function a new image variable is created, but win mobile always shows the same
    function renovarUrl() : Void{
    var imagen2: Image = Image{
    url: “http://127.0.0.1/map0/cam0/cam.jpg”;
    cam.image=imagen2;
    thanks!

    Hi,
    I´ve tried to append a random number to the loadMovie
    (in fact in my case I have to use the loadClip function, but I
    don´t think this makes a difference), nevertheless it keeps
    loading the cached image in the browser, here is my code:
    stop();
    this.createEmptyMovieClip("Bezier2",this.getNextHighestDepth());
    //receive vars from first frame to create masking shape
    with (this.Bezier2) {
    lineStyle(0,999999,100);
    beginFill(0xFF0000);
    moveTo(posi1x,posi1y);
    lineTo(posi3x,posi3y,posi2x,posi2y);
    lineTo(posi2x,posi2y,posi1x,posi1y);
    lineTo(posi1x,posi1y,posi3x,posi3y);
    lineStyle(0,0xFF0000);
    lineTo(posi2x,posi2y,posi4x,posi4y);
    lineStyle(0,999999,100);
    lineTo(posi4x,posi4y,posi1x,posi1y);
    //make mc and initialize loading of image
    var holder = this.createEmptyMovieClip('holder', 0);
    var mcl = new MovieClipLoader();
    var lstn = new Object();
    mcl.addListener(lstn);
    //apply mask before image loading
    lstn.onLoadInit = function(clip) {
    clip.setMask(Bezier2);
    mcl.loadClip('../image1.jpg?a="+Math.random(9999));',
    holder);
    Any guess? Thanks

  • Unable to install the Netbeans 4.1 Mobility Pack

    Hi,
    I have Netbeans 4.1 installed on my machine and I have just installed Java Studio Enterprise 8 so that I can compare them. I have been trying to install the Netbeans 4.1 Mobility Pack into the Java Studio Enterprise 8 IDE as described on the website but it will not install. Should I uninstall Netbeans 4.1 first?

    The installer included with JSE CD should work fine; also the current installer hosted on netbeans.org should work fine too.
    But there were some earlier installers that were specifically looking for 'nb41' directory (which exists in netbeans41 but not in jse).
    If the installer is looking for this directory, one workaround is to create an empty directory named 'nb41' in jse8 install directory ( parallel to ide5, platform5 etc). The installer merely checks for the existence of this directory and the contents do not matter; installation should proceed without issues if this dir exists.
    Ref: http://www.netbeans.org/issues/show_bug.cgi?id=60850

  • S60 3rd Edition MIDP + Netbeans 5.5 + Mobility CLDC !URGENT!

    My Environment       Device: Nokia E61
           SDK: S60 3.0 MIDP SDK (S60 3rd Ed MIDP)
           Java: javac 1.5.0_12
           OS: Microsoft Windows XP Professional [Version 5.1.2600]/ Service Pack 2
           Computer: AMD Athlon 64bit CPU 3200+ 2.1GHz, 1.00GB Mem
           NetBeans (5.5 dev build ):
              Number: 200704122300
              Date: ${buildday}
              Branding:
              Branch: release551
              Tag:
           Mobility: NetBeans Mobility Pack 5.5.1I am having problems building application with netbeans. The jar file is coming out excessively large and it fails to run on the emu, get -10504 error (already tried to lookup error code at http://newlc.com/Symbian-OS-Error-Codes.html and it is not listed there). I inspected the .jar file and did not see anything there that did not belong; only .class, .png, kxml library and manifest files were present (no Thumbs.db or other clutter).
    When I build the same application with CarbideJ the jar file size is significantly smaller and it executes on the Emulator. Are any of the CarbideJ tasks, namely <ndsj2mejavac> and/or <ndsj2mepackage>, doing something special to source, jar or images that maybe netbeans is skipping; running a different preverifier, different archiver, using it's on version of javac.exe or something?
    When I compile using Carbide.j this is what I get (NO obfuscated/NO debug info);
         AppXXX.jad (400 bytes)
         AppXXX.jar (728,538 bytes)however, when I compile with Netbeans, I get the following(obfuscated set to level 9/NO debug info);
         AppXXX.jad (471 bytes)
         AppXXX.jar (927,530 bytes)The jad files generated were different but only because one had more descriptor tags in it, nothing major about that. The problem is that the jar file generated by netbeans is significantly larger than the one generated by carbide. Also, I compiled the exact same program under the Sun Wireless toolkit v2.5.1 and got the exact same jar file sizes and runtime error on emu that netbeans generated; I installed s60 sdk for wtk and selected it before before creating package for application. Also I state before, the version created with Carbide.j runs in the Emu; however, the NB version does not.
    Already posted to Nokia forum and no help there
    I would be very appreciative if I can quickly get some help!
    Files:
    build.xml (output of netbeans build process is append to the end of the build file in an xml comment): http://home.comcast.net/~eramsey1535/JavaME/Nokia/build.xml
    CFG_DEV.properties: http://home.comcast.net/~eramsey1535/JavaME/Nokia/CFG_DEV.properties.txt
    project.properties: http://home.comcast.net/~eramsey1535/JavaME/Nokia/project.properties.txt
    image of error displayed on emu: http://home.comcast.net/~eramsey1535/JavaME/Nokia/error_displayed_on_emu.gif
    image of error in emu popup dialog: http://home.comcast.net/~eramsey1535/JavaME/Nokia/error_displayed_in_emu_popup_dialog.gif
    Thanks!

    Hi,
    I'm facing exactly the same problem, and was wondering whether you found the solution to this problem.
    Thanks in adance,
    Iwan

  • How to insert a background image in VGroup in Flex Mobile

    I want to insert a background image for this VGroup. Help me out. I'm new to Flex !!
    I'm using this code in Flex Mobile Application
    <s:VGroup height="100%" width="100%"
              paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10">   
        <s:List id="homeList" height="100%"
                labelField="title"
                dataProvider="{homeNews}">
            <s:layout>
                <s:TileLayout requestedColumnCount="1"
                              verticalGap="5"/>
            </s:layout>
            <s:itemRenderer>
                <fx:Component>
                    <s:ItemRenderer>
                        <s:VGroup>
                            <s:BitmapImage source="{data.source}"/>
                            <s:Label text="{data.title}" />
                        </s:VGroup>
                    </s:ItemRenderer>
                </fx:Component>
            </s:itemRenderer>
        </s:List>
    </s:VGroup>

    I don't think you can add a background image to a VGroup directly, nor can VGroup be skinned.
    As far as I am aware there are probably 2 solutions
    1) use a SkinnableContainer instead skin the container to have a background image and set its layout to VerticalLayout
    2) enclose the VGroup in a Group with a BasicLayout. you can then add a background image to the Group and overlay the VGroup

  • SVG image does not appear in mobile version but does in desktop version

    Hi,
    I am new to using Muse and have created only one site before in Muse. I have taken screenshots to show the problem I am having.
    I have used Illustrator to create the following logo image that I save out as an SVG file:
    As you've probably guessed, I have used clipping mask to insert the marbly purple image into the shapes and text (this may be relevant to the problem, I don't know).
    I then save it out as an SVG with the following details as advised by Adobe:
    Then moving into Muse, I File > Place the SVG file. 'Unable to generate thumbnail' comes up in both desktop and phone versions:
    Regardless, I uploaded to FTP post to my website. While the SVG appears perfectly on my desktop browser, it does not show at all on my phone browser:
    This is not only happening on my phone, I have visited the same website on multiple phone devices and still the SVG image does not appear. Any ideas why this is happening?
    Have I totally missed something about file formats for mobile browser versions in Muse?
    Also- in illustrator, I saved the SVG logo for the mobile version as a SMALLER SVG than the one I saved for the desktop version.
    Thanks

    Use a PNG file. I see nothing in your logo that would warrant using anything else. You're not scaling it, there is no interaction and all you are doing is masking out some data that is pixels already. Pardon me, but using an SVG makes no sense at all. Beyond that one would need to see the file, but my guess would be that the "responsive" setting once again embeds some garbage data. Wouldn't be the first time...
    Mylenium

  • Image Won't Display In Mobile Safari

    I'm developing a website, it validates properly, and it works perfectly in Chrome, FireFox, Internet Explorer, and Desktop Safari. The only problem that I'm having with it is in Mobile Safari for iOS. I have a div element with an <img> tag inside it. On a desktop browser, it will show it. However, iOS will display a missing image icon instead. This only occurs on iOS. You can test it out yourself by going to http://covu.optini.com first in your desktop browser and then again in your Mobile Safari browser. Could anyone please give me some insight as to why this would be happening? Thanks. All the other images display correctly in Mobile Safari.

    Update: It works perfectly on iOS5 Mobile Safari. It isn't working on iOS 4.3.3's Safari.
    I hate to double post, but the edit button wasn't showing up.

  • Showing image instead of flash for mobiles?

    I am just wondering if it is possible to show an image instead of flash content for mobiles?
    I want to allow the adobe sniffer to do its thing when it is people using pc and mac browsers and direct them to the plug in page to download the flash player if they need it, but is there a way to sniff for a mobile / smart phone browser and if they cant view flash it will show an image instead?
    Any help appreciated.

    You can use Javascript to detect the browser and platform for any given user. You can then parse that information to push the content that you want to use for the result. You can find a good write-up with example code here: http://www.quirksmode.org/js/detect.html

  • Can't copy images from smart albums to mobile me gallery

    Folks,
    I'm rather new to Aperture ... so my question might be a trivial one. I'm having trouble to drag images from a smart album to a Mobile Me album. The images simply do not end up in the gallery. I can, however, create a new gallery from a selection in a smart album, and I can drag images from their regular albums to the Mobile me gallery. Is this a restriction in Aperture 2.1.4?

    Same problem here.
    Is this just not possible?
    Do I have to re-create a new MobileMe gallery every time I want to add photos?
    Maybe someone wrote a script?
    Thanks for any reply answering one of those frustrating questions

  • Most efficient way to handle Image sizes with respect to Mobile Screen Size

    Hi all,
    I and trying to find the best possible way to manage Images with respect to the size of mobile screen.
    If I have an image that is best fit on mobile screen size (176 x 144) then how can I make it best fit for (128 x 128) screen size ?
    rizzz86

    Hey Rizzz86,
    You could also scale down a higher resolution image to fit smaller screens, however you will find that resizing by factors other than 2, 4, 8 is harder to achieve with a decent quality and much slower on lower spec devices.
    You could also display 128x128 image centered on 176 x 144 screen with black borders around it.
    It will look not that bad (i.e. borders of 24 pixels top and bottom and 8 pixels left and right) and will cost you nothing in terms of space or processing.
    In the end having an image in 3 different sizes will not increase the MIDlet size by much, unless you are having tens of such images (for example custom UI elements).
    Best solution is to have a bit of both I think. Personally I use scaling down by factors that are powers of 2 and displaying with the black borders.
    Daniel

  • Work with images in netBeans Help needed !

    Hai Guys,
    I have problem in inserting image in JFrame(In netBeans). Can any one tell me the way to insert an image to JFrame and save that image in my SQL database?
    Guys this is a very important task to me so please help me !
    Thanks for watching / replying

    If you are using net beans use the image view if it and insert the picture of the customer in to explicitly in to the column you want to put in and check the code generated behind.
    So you come to how to insert the picture in to the pane of the Jframe.
    Inseting the particular image in to database
    do as he said "BLOB" as your datatype and store the image.
    I think in your Jframe you might be taking the input from the user and posting it to show the user what he has entered and then saving it into the database.
    so directly put the input data first in to the required column where you are showing user the data what he entered and then on submit/save button call action performed method to save the data in the database

  • NetBean 4.1 mobile

    Hello all!
    this could be a stupid question but I have problem to use the crypto library (jar file) inside my j2me project (bouncycastle)
    So I'ha tried to add it using "properties" -> libraries but still seems to unaffect the compilation's process (cannot find symbol)
    any ideas?
    best regards folks!
    alex

    in order to use bouncycastle library you have to add cldc_classes.zip or cldc_crypto.zip to your project using Project settings | Libraries and Resources | Add jar. The zip files are part of lcrypto-j2me-129.zip :
    lcrypto-j2me-129/zips/cldc_classes.zip
    lcrypto-j2me-129/zips/cldc_crypto.zip
    Also make sure you have installed the latest updates of NetBeans Mobility Pack 4.1 from the update center - Tools | Update Center
    -Martin

  • Why do some images not show on the mobile browser but do on the normal Firefox

    I have an HTC desire hd. I have had a site built.
    the images don't show on the mobile browser. when using the standard browser which came with the phone 'internet' it works fine. is there a reason for this?

    I get a content encoding error when trying to load one of the problem images.
    http://www.signapedia.com/gethumb.php?path=userfiles/31_prodimg_55856_img04.jpg&size=85
    Why this happens will take some additional research.

  • Lightroom Desktop Syncs Collections but NOT the Images Inside Them From Lightroom Mobile

    I am on a Mac running 10.10.2
    - Lightroom 5 CC (current)
    - Lightroom Mobile on an iPad Air (all current)
    - Lightroom Mobile on a iPhone 6+ (all current)
    The iPad and iPhone and web all Sync correctly between each other. A Collection created on the Desktop syncs just fine to the web and LT Mobile.
    The Desktop updates the names of the Collections from the iPhone and iPad without an issue
    However, the Desktop does NOT sync the images in the Collections. Though if you hover over the Sync icon to the left of the Collection name, it does know how many images are supposed to be in the catalog.
    I have deleted and reinstalled both the Desktop and Mobile applications on all platforms.
    On the Desktop version, the Collections in "From LR Mobile" have the Sync icon to the left of the Collection name.
    I have signed out from the Desktop version multiple times.
    When I relaunch the Desktop version, it says "Signed On, Sync On"
    I have deleted the Sync.lrdata file multiple times.
    I have restarted the Desktop multiple times.
    All to no avail.
    I have my Diagnostic report created and ready to be uploaded to Dropbox for viewing.
    Please help!

    Thank you for your response.
    I tried Deleting Data, then created a new collection on the iPhone. It appears just fine on the Web, Lightroom Desktop sees the new collection, the icon to the left says it is syncing, it knows how many images are to be synced, but it still is not bringing in the image itself.
    A private message with a link to DropBox with the Diagnostic report has been sent.

Maybe you are looking for

  • Variable for Document Date in Customer Receivable Aging

    Hi all, This is regarding u201CCustomer Receivable Aging u2013 Detailsu201D in SBOne. In the print layout, I found 3 types of date in system variables i.e. 1) system variable 184 = Due Date 2) system variable 185 = Posting Date 3) system variable 187

  • 11g (11.2.0.3) : steps to take after reboot of system (asm grid ...)

    Hi all, I'm fairly new to oracle installation and the likes. I have a setup in which Oracle 11g is installed on a virtual machine (vagrant - virtualbox) where i can succesfully install : Grid software Db software Asm disks database installation After

  • URGENT : for Shalendar Mehta and Gary myers

    HI SHLENDAR and GARY I KNOW IT VERY WELL , BUT WHAT WILL HAPPEN TO THIS IF SOMEONE DELETED THAT ATTACHED LIBRARY. THE EXECUTION WILL AGIN START AND THATS NOT TEH REQUIREMENT PLZ, THINK OVER IT AGAIN I WANT TO STOP THE DATABASE DML'S AND QUERIES THIS

  • BAPI to Change MM Vendor Quotation (Simulate ME47)

    Hi everybody. I'm abap consultant and I'm trying to find a BAPI to change a Vendor Quotation. I've found two so far, but they are especific to Customer or Purchase Order (BAPI_CUSTOMERQUOTATION_CHANGE and bapi_po_change). I've seen that currently the

  • Sales order number in customer line item

    Hi All, we have a requirement whereby we need to get the sales order number in the customer line item. Normally, the sales order number is populated in the GL line item (BSEG - VBEL2). We need to copy the sales order number to the customer line item.