Using an Image as parameter

I want to send an Image object to a method named insertimage and I don't know how to do it.
I have the following lines:
import javax.microedition.lcdui.*;
import javax.microedition.lcdui.Image;
import javax.microedition.midlet.*;
public class MiBotonMid extends MIDlet
implements CommandListener,Boton.Receptor {
private Display display;
Image duke = null;
ImageItem imgIt = new ImageItem("", duke, ImageItem.LAYOUT_DEFAULT, "TECHTOOL");
protected void startApp() throws MIDletStateChangeException {
if( display == null )
iniMidlet();
private void iniMidlet() {
display = Display.getDisplay( this );
try
duke = Image.createImage("/logo.PNG");
insertimage(duke);
catch (java.io.IOException ex)
System.err.println("Excepci�n: " + ex);
public void insertimage(Graphics g, Image duke)
g.drawImage(duke,0,0,Graphics.TOP);
When I compile this lines it appears me the following lines:
insertimage(javax.microedition.lcdui.Graphics,javax.microedition.lcdui.Image) in boton.MiBotonMid cannot be applied to (javax.microedition.lcdui.Image)
insertimage(duke);
Anyone knows how to solve this error?
Thanks.

Well i am doubtful but i think wbmp only should be supported.

Similar Messages

  • Is it possible to use an image as the "base" of a mapviewer?

    Hi,
    I am trying to use a jpg image as the "base" of a mapviewer. After Insert the image, I create a "georaster theme" for it. Then, I create a "base map" by using the georaster theme created in the previous step. Up till now, both "georaster theme" and "base map" can be preview normally. After that, I create a "title layer" by using the "base map" which I created. However, only a write rectangle shown up when I preview the "title layer".
    So, I wonder it is possible to make a map by using an image as it base? If yes, would you mind telling me how to make it done. And, what value should I input for the following parameter:
    a) When I import an image in mapbuilder:
    1) Top X coordinate , Top Y coordinate
    2) X resolution, Y resolution
    b) When I make a title layer:
    1) Max X , Min X, Max Y, Min Y
    2) Zoom in scale (Once I zoom in the image, the image is gone?? It's very strange)
    Here's the property of that image:
    Dimension = 288 * 175
    Width = 288 pixels
    Height = 175 pixels
    Horizontal resolution = 72 dpi
    Vertical resolution = 72 dpi

    iMacs late 2009 or newer can be used in Target display
    mode.  Any older, no can do.
    The only other way is via network Screen Sharing or
    some otherVPN network like solution.  The issue here
    though is that video performance will be pretty severely
    hampered.

  • Toggle between Web Items using an Image link in WAD 7.0

    Hello,
    i want to toggle between Web items using an image link: e.g. on my template I have a visible table and a hidden chart, now when I click on a small chart image I want the table to get hidden and the chart to get visible. I know that this is possible using a button group, but I need to make this possible using an image.
    My approach is the following:
    1. Using a script item with 2 commands of type SET_ITEM_PARAMETERS from the command wizard, from which one command hides the table and one command makes the chart visible.
    2. Writing a hyperlink which calls up the script using the image as source.
    Now my problem:
    This works only if I'm using ONE command of type SET_ITEM_PARAMETERS in the script function. So I can either make the chart visible or hide the table. When I insert a second command in the java script nothing works anymore. However, I need to use both commands at once in order to make it useful. I don't know how to program in javascript, can you help me out?!
    Thanks,
    Norbert
    PS: I could show you the javascript code which was created automatically by the web application designer including both commands, but as I've just seen it in the preview it looks totally messed up since it doesn't get formatted corrected.

    Hi Norbert,
    There is an easier approach. In the button group item, you can insert an image and a description. Just open the parameters of your button there you will find the parameter 'icon'. Insert an image there and leave the 'caption' empty.
    Best regards,
    Janine

  • Unable to use an image in a DVD menu background

    I've been unsuccessful in using an image as the background in the DVD main menu in PE 9.  The image shows up correctly in the preview, but not in the burned DVD.  I'm a long time user of PE 2.0 and never had this issue.  I've tried different image sizes (720x486, 720x480, 640x480), different image formats (jpg, bmp, psd), and different menu templates with no success.  The only thing that worked was specifying a frame out of the video.  Please help so I don't create any more drink coasters!

    Barry,
    Welcome to the forum.
    This appears to be a Bug in PrE 9, and there are several threads on the same issue. It seems that some Menu Sets perform OK, some will not accept a new background image, and some will accept it for either the Main, or the Scene Selection Menu, but not both.
    I'll find a few of those, and link to this thread, for your reading. In the meantime, I would suggest filing a Bug Report with Adobe, so that they will know to work on correcting this problem.
    Good luck,
    Hunt

  • Can we use Column Names in Parameter Cursor

    Hi
    can we use Column Names in Parameter Cursor??
    DECLARE
    CURSOR Emp_Cur (P_Deptno NUMBER)
    IS
    SELECT Empno, Ename
    FROM Emp
    WHERE Deptno = P_Deptno;
    BEGIN
    FOR Emp IN Emp_Cur(10)
    LOOP
    DBMS_OUTPUT.PUT_LINE('The Employee Number is: '||emp.Empno);
    DBMS_OUTPUT.PUT_LINE('The Employee Name is: '||emp.Ename);
    END LOOP;
    FOR Emp IN Emp_Cur(20)
    LOOP
    DBMS_OUTPUT.PUT_LINE('The Employee Number is: '||emp.Empno);
    DBMS_OUTPUT.PUT_LINE('The Employee Name is: '||emp.Ename);
    END LOOP;
    END;
    In the above Program, I send Deptnumber. If i send Column names like Empno, Ename. What can i do??
    If Declare Samething Through Parameter Cursor, it doesn't accept VARCHAR2(Size)

    For parameters you don't use size, just the type (DATE, NUMBER, VARCHAR2, CLOB, ...)
    DECLARE
      CURSOR Emp_Cur (P_Ename VARCHAR2)
      IS
        SELECT Empno, Ename
        FROM Emp
        WHERE Ename = P_Ename;
    BEGIN
      FOR Emp IN Emp_Cur('SCOTT')
      LOOP
        DBMS_OUTPUT.PUT_LINE('The Employee Number is: '||emp.Empno);
        DBMS_OUTPUT.PUT_LINE('The Employee Name is: '||emp.Ename);
      END LOOP;
    END;

  • Backing up and restoring using disk images.

    Hi there
    I want to create a disk image of a mac's HDD, then put the disk image onto secondary internal HDD, so that in the event of the mac going belly up, I can start from the OSX system disk, format the main drive, restore from the disk image on the 2nd HDD, and off I go.
    Using SuperDuper, I created a sparse disk image of the HDD onto the 2nd HDD. SuperDuper created a file called "HDDname.sparseimage". However, when I start Disk Utility and go to restore, it won't allow me to use the created file - the file is visible, just greyed-out.
    I used a sparse disk image because I read that normal disk images will be the same size as the original folders/volume and are read only. I only want it the size of the actual data because of space restraints and would prefer to have it read-write too.
    Is it a matter of just changing the filename from "HDDname.sparseimage" to "HDDname.dmg", to get DU to access it, or can DU not use sparse images?
    Anyone shed any light?
    TX
    Macfool

    Not sure if this will solve your problem, but I notice that although when I click on the Image button and navigate to a .sparseimage file, it is grayed out, I can drag-and-drop that same .sparseimage file into the Source field and it shows up.
    Did you try Images menu > Scan image for restore and selecting your sparse disk image to scan?
    Hope this helps...

  • I scanned an image and want to use the image trace tool, but it doesn't pick up all the lines.  Is there a way to darken the lines before using the image trace tool?

    I scanned an image and want to use the image trace tool, but it doesn't pick up all the lines.  Is there a way to darken the lines before using the image trace tool?  Help!

    If the scan is in B&W, then play with the Threshold setting here
    If it's in Color, then you will have to open the scan in a Raster editing software (like Photoshop) and play with the Brightness/Contrast settings to make the lines bolder.

  • Default sales org on selection screen using set and get parameter!!

    Hi,
    I need to default value on selection screen using SET n GET parameter...logic to be used should be:
    Sales Organisation:
    This field should be filled by default using the user parameter id VKO. (using sentence GET PARAMETER and SET PARAMETER)...
    Hope i need to write the code in initialisation and what shud b the content?
    Regards
    Gunjan

    hi,
    TABLES <table name>.
      SET PARAMETER ID VKO FIELD <tablename-fieldname>.
    call transaction 'zxx'.
    try this sample program,
    REPORT BOOKINGS NO STANDARD PAGE HEADING.
    TABLES SBOOK.
    START-OF-SELECTION.
      WRITE: 'Select a booking',
      SKIP.
    GET SBOOK.
      WRITE: SBOOK-CARRID, SBOOK-CONNID,
             SBOOK-FLDATE, SBOOK-BOOKID.
      HIDE:  SBOOK-CARRID, SBOOK-CONNID,
             SBOOK-FLDATE, SBOOK-BOOKID.
    AT LINE-SELECTION.
      SET PARAMETER ID: 'CAR' FIELD SBOOK-CARRID,
                        'CON' FIELD SBOOK-CONNID,
                        'DAY' FIELD SBOOK-FLDATE,
                        'BOK' FIELD SBOOK-BOOKID.
      CALL TRANSACTION 'BOOK'.
    regards,
    siva
    Message was edited by:
            Shan

  • Java Application [Java Bundler]: how I can use an image? Which path?

    Hi,
    how I can use an image in my Java Application when I create the jar bundle with Jar Bundler? Which is the path of the file? I don't know if I got it across...

    By image, do you mean an icon for your program?
    If so, then you need to create the image you want using any graphical drawing program, then use a utility such as Img2icns to put the image into the correct format (.icns). Once you have this, you can drag it into Jar Bundler and IIRC it just works.
    Bob

  • When I use yahoo images and i open an image in a new window, it tweakes out firefox so that panes are distorted and exerything, the whole firefox browser looks like an F5 tornado took it apart and lumped it on my desktop... is this a known glitch?

    When I use yahoo images and open an image in a new window, the page, once I click its tab causes the entire browser to scramble graphically, making it nearly impossible to navigate further. I right-clicked and selected close tab. That regains the visual clarity of the browser. But how can I fix this to browse the images?

    Phillipp,
    I tried it again using "save link as", and this time it actually worked! I just now downloaded several more using the "save link as" option, and it works perfectly. Thanks. Problem solved.
    Littleberry

  • Printing dunning notices using SMARTFORMS,error during parameter transfer

    Hi Friends,
                    I face a error message "Include text ZGA_DUN_HDR does not exist (object TEXT, ID ST)" when i run the dunning run.
                    I had searched every node for text ZGA_DUN_HDR in the smartform,I didnt find the text in it.
    However when I execute the smart form for print preview an error message "Printing dunning notices using SMARTFORMS,error during parameter transfer".This error i believe is due to wrong parameter passing in the fm 'GET_SF_DUNN_DATA'.It raises an error no_parameters_found.All parameters are passed correctly.
                    Can you guys help me out.
    Edited by: RAJIV KAUSHAL on Nov 14, 2008 6:03 PM

    you can create this text ZGA_DUN_HDR  in SO10 tcode and try ...

  • Problem in creating 1 image using differnt images

    Dear Fellows I want to create an image by using different images in byte array format. Images may be transparent or normal images. I want final result in byte array. I am using the following technique which is working fine but the problem with this technique is that it takes too much time to create an image. This is because I am using MediaTraker. If I delete the code of MediaTracker then program have undeterministic behavior i.e, sometimes it create the final image properly and sometimes nothing is displayed in final image.
    I need some help from you. If anyone of you know the technique to draw image using different images without using mediaTracker kindly let me know.
    Early replies will be appreciated
    // here is the sample code which i m using for creating image
    byte[] backgroundImage= // read 800 X 600 image from disk and convert it in to byte array
    byte[] image1 = // read 200 X 200 image from disk and convert it in to byte array
    byte[] transparentImage // read 300 X 300 transparent image from disk and convert it in to byte array
    Image img=null;
    Frame frame =new Frame();
    frame.addNotify();
    //creating BufferedImage object to store Final image
    BufferedImage requiredImage= new BufferedImage(800,600,BufferedImage.SCALE_SMOOTH);
    //get Graphics of BufferedImage created above
    Graphics2D g=(Graphics2D) requiredImage.getGraphics();
    ///// begin draw back ground image
    img=Toolkit.getDefaultToolkit().createImage(backgroundImage);
    try
    MediaTracker mt = new MediaTracker(frame);
    mt.addImage(img, 0); // adds image with ID 0
    mt.waitForID(0);
    }catch(Exception myex)
    myex.printStackTrace();
    //draw background starting from x=0, y=0 with 800 X 600 dimentions
    g.drawImage(img,0,0,800,600,null);
    ////////// end draw background image
    ////////// begin draw image1
    img=Toolkit.getDefaultToolkit().createImage(image1);
    try
    MediaTracker mt = new MediaTracker(frame);
    mt.addImage(img, 0); // adds image with ID 0
    mt.waitForID(0);
    }catch(Exception myex)
    myex.printStackTrace();
    //draw image1 starting from x=10, y=10 with 200 X 200 dimentions
    g.drawImage(img,10,10,200,200,null);
    //////////// end draw image1
    //////begin transparentImage
    img=Toolkit.getDefaultToolkit().createImage(backData);
    try
    MediaTracker mt = new MediaTracker(frame);
    mt.addImage(img, 0); // adds image with ID 0
    mt.waitForID(0);
    }catch(Exception myex)
    myex.printStackTrace();
    //draw transparentImage starting from x=400, y=0 with 300 X 300 dimentions
    g.drawImage(img,400,0,300,300,null);
    ///end draw transparent image
    byte []finalResult = //convert requiredImage into byte array;
    you can mail me the solution on my email address [email protected]
    thanks with best regards
    and waiting for someone to reply
    kamran zameer

    is there anyone on this forum to help me??????
    regards,
    kamran zameer

  • How can you use one image and edit it three different ways to export later?

    I am a new Lightroom 3 user.  How can use the same image and edit it multiple ways to produce mulitple images to later export?  For example,  I have a picture of a bride and groom.  I want to use that image and create a color image, a black and white image, and a close up of their hands.

    Do I need to do either of those options before I start editing the image at all?  For example,  what if I am working on the image and doing some creative edits.  Then I think of another option that I could do.  Is it too late at that time or can I still get the original image to begin with?

  • Using an image as label in Spry Accordion Menu

    I was wondering if it was possible to use an image instead of
    text in the spry accordion menu. I have replaced the text that is
    there with a roll-over image link however I'm unable to label it
    since it uses the text as the label and therefore can't set the
    default panel I want opened. Is there a way to do this? Thanks for
    your help.

    Stefaan Lesage wrote:
    Is this possible with Pages 09 ? And can I achieve this ?
    Is it possible to look at the Help or at the Pages User Guide
    In the English one, page 17, we may read:
    • Some graphics, such as watermarks or logos, appear on pages. These objects are called master objects. If you cannot select an object in a template, it’s probably a master object. To learn more, see “Using Master Objects (Repeated Background Images)” on page 60.
    You can drag or place objects on a page, including imported graphics, movies, and sound, or objects that you create within Pages, including text boxes, charts, tables, and shapes.
    You can also insert pages that have been preformatted for the template you’re using. Click Pages or Sections in the toolbar and choose a template page. The new page is added immediately after the page where you placed the insertion point.
    Yvan KOENIG (from FRANCE vendredi 27 février 2009 23:01:32)

  • Signing a document using an image

    I can no longer sign a document using an image with Adobe Ready XI.  I have tried to "change saved signature" and click on the "use image" option.  It then requires me to save a copy but after I do so the box disappears and I don't have an option to browse for the image I want to use.  If I click on Place signature again it forces me to set up a digital ID. This happened after an update I did yesterday.  How can I use an image to sign and NOT a digital ID?

    Ok, here's what I've got:
    myCert.cer (certificate)
    myKey.pfx (PKCS12 keystore)
    With this two files I should be able to get the private key (from myKey.pfx), the public key (from the certificate)... and use this to sign the document.
    Can anyone help me to do that? (in Java Code)
    I'll apreciate any help...
    Juaris.

Maybe you are looking for