Display image in specified position

Hello everyone
I wanna know how I can display an image at an specified (x,y) position. I'm totally lost in how doing it.
I have a bmp image of an arrow (which I could convert into bitmap or gif if needed) and I want to display it in an specified place. I have no idea how to do it.
Can someone show me the beginnings?
thanks

java.awt.List you can not.
javax.swing.JLast you can.

Similar Messages

  • Every since I have upgraded to IOS7, Words with Friends only displays in the portrait position.  Cannot seem to change it to landscape.  Can anyone help?

    Every since I have upgraded to IOS7 on my ipad, Words with Friends only displays in the portrait position.  I cannot get it to be landscape.  Can anyone help me out.  I have turned it off and started again and keep turning the ipad only to have it go to portrait in the opposite side.

    The "Use custom settings for history" selection allows to see the current history and cookie settings, but selecting this doesn't make any changes to history and cookie settings.
    Firefox shows "Use custom settings for history" as an indication that at least one of the history and cookie settings is not the default to make you aware that changes were made.
    If all History settings are default then the custom settings are hidden and you see "Firefox will: (Never) Remember History".
    "Never Remember History" means that Private Browsing is active and "Always use private browsing mode" gets a checkmark.
    The default settings mean that cookies are enabled and thus should work.
    Did you try to delete the cookies from the bank site?
    Details like websites remembering you (log you in automatically) are stored in a cookie.
    *Create a cookie 'allow' exception to keep such cookies, especially in case of secure websites and when cookies expire when Firefox is closed.
    *Tools > Options > Privacy > "Use custom settings for history" > Cookies: Exceptions
    In case you use "Clear history when Firefox closes" or otherwise clear history:
    *do not clear the Cookies
    *do not clear the Site Preferences
    *Tools > Options > Privacy > Firefox will: "Use custom settings for history": [X] "Clear history when Firefox closes" > Settings
    *https://support.mozilla.org/kb/remove-recent-browsing-search-and-download-history
    Clearing "Site Preferences" clears all exceptions for cookies, images, pop-up windows, software installation, passwords, and other website specific data.
    Clearing cookies will remove all specified (selected) cookies including cookies with an allow exception that you would like to keep.

  • How to display image and data in module pool screen?

    Hi,
    I want to display image and relevant data besides the image in module pool screen, I am using docking container to display the image.
    Actually I am able to display image or data any one but not both.
    one more thing I want to display multiple images and their data.
    Please suggest some one if you have any idea.
    Regards,
    Dileep.

    You can try below way, I have used in report.
    DATA: gc_docking              TYPE REF TO cl_gui_docking_container, "#EC NEEDED  "Docking Container
           gc_split                 TYPE REF TO cl_gui_easy_splitter_container, "#EC NEEDED  "Splitter
           gc_top_container         TYPE REF TO cl_gui_container, "#EC NEEDED  "Top Container
           gc_bottom_container      TYPE REF TO cl_gui_container, "#EC NEEDED  "Bottom Container
          gc_document              TYPE REF TO cl_dd_document, "#EC NEEDED  "Document
           gc_events                TYPE REF TO lcl_event_class, "#EC NEEDED  " Local Event Class
           gc_grid                  TYPE REF TO cl_gui_alv_grid, "#EC NEEDED  " ALV Class
    " Creating Docking
    CREATE OBJECT gc_docking
           EXPORTING
             ratio = c_95.
         IF sy-subrc EQ 0.
    * Splitting the Docking container
           CREATE OBJECT gc_split
             EXPORTING
               parent        = gc_docking
               sash_position = c_10 "Position of Splitter Bar (in Percent)
               with_border   = c_1. "With Border = 1 Without Border = 0
         ENDIF.
    *   Placing the containers in the splitter
         gc_top_container = gc_split->top_left_container .
         gc_bottom_container = gc_split->bottom_right_container .
    *   Creating Grid
         CREATE OBJECT gc_grid
           EXPORTING
             i_parent = gc_bottom_container.
       ELSE.
    * Background job handling
         CREATE OBJECT gc_grid
           EXPORTING
             i_parent = gc_docking.
       ENDIF.
    *   Creating the document
       CREATE OBJECT gc_document
         EXPORTING
           style = 'ALV_GRID'.
    Regards,
    Sameer

  • How to display images from BLOB column via APEX 4.0

    Hello,
    I did the following in order to display images of two Oracle records on the APEX page. I am using APEX Version : 4.0.1.00.03 , Oracle DB Version : 10.2.0.4.0.
    1. Created An oracle table TEST_FORM
    with 3 columns
    ( ID number, MIME_TYPE varchar2(255) , Image BLOB )
    2. Inserted two records
    10001, image/gif, ( actual image1)
    10002, image/gif, ( actual image2)
    3. created an Oracle procedure
    CREATE OR REPLACE PROCEDURE show_my_form ( p_image_id IN test_form.id%type) AS
    l_mime test_form.mime_type%type;
    l_length NUMBER;
    l_file_name VARCHAR2 (2000);
    lob_loc test_form.IMAGE%type;
    BEGIN
    SELECT mime_type, IMAGE
    , DBMS_LOB.getlength (IMAGE)
    INTO l_mime, lob_loc, l_length
    FROM test_form
    WHERE id = p_image_id;
    owa_util.mime_header(l_mime, false);
    htp.p ('Content-length: ' || l_length);
    owa_util.http_header_close;
    wpg_docload.download_file (lob_loc);
    END show_my_form ;
    4. In Apex 4.0
    step1. Created an interactive report on a new APEX page
    step2. Specified the following in the Region Source
    select id, mime_type, '<img src="#OWNER#.show_my_form ?p_image_id=#ID#" />' photo
    from TEST_FORM
    The column result shows as <img src="CCS.show_my_form?p_image_id=#ID#" />
    I am unable to display the column image as a link to a proper image photo.
    Could you please advise me if I missed anything ?
    Thanks a lot.
    Regards
    Susanna
    Edited by: user10318332 on 13/12/2010 15:51
    Edited by: user10318332 on 13/12/2010 20:10

    Maybe the space you have before the ? is causing issues. there shouldn't be any space.
    Your procedure looks to be much the same of one that I have.
    Have you granted execute on your procedure?
    Also, what version DB are you running? This could be another issue: http://daust.blogspot.com/2006/04/xe-calling-stored-procedures.html
    But anyway, you don't need to create your own procedure these days. You could do the following:
    in your query, have a column: dbms_lob.getlength(blob) photo ; save, then in column attributes for that column, apply a format mask. There is usually a link below the text box for the format mask - BLOB Download Format Mask, which will help you build the format mask. But it is documented here: http://download.oracle.com/docs/cd/E17556_01/doc/user.40/e15517/advnc.htm#BCGGJHEF
    Ta,
    Trent

  • How to display image in selection-screen of a report

    Dear all ,
    i want to show my image from url or from desktop to the report selection-screen . i have searched sdn and found some code . after applying it i am not able to display image in the selection-screen although it is displaying the box in which the image should appear . here i am sending my code plz verify where is the mistake .
    REPORT  ZPIC2.
    DATA: docking TYPE REF TO cl_gui_docking_container,
    picture_control_1 TYPE REF TO cl_gui_picture,
    url(256) TYPE c .
    PARAMETERS: A(4) DEFAULT '4' .
    PARAMETERS: B(4) DEFAULT '5' .
    AT SELECTION-SCREEN OUTPUT.
    PERFORM show_pic.
    **& Form show_pic
    FORM show_pic.
    CREATE OBJECT picture_control_1 EXPORTING parent = docking.
    CHECK sy-subrc = 0.
    CALL METHOD picture_control_1->set_3d_border
    EXPORTING
    border = 5.
    CALL METHOD picture_control_1->set_display_mode
    EXPORTING
    display_mode = cl_gui_picture=>display_mode_stretch.
    CALL METHOD picture_control_1->set_position
    EXPORTING
    height = 100
    left =   150
    top =    58
    width =  350.
    CALL METHOD picture_control_1->load_picture_from_url
    EXPORTING
    url = 'C:\abc.jpg' .
    endif .
    IF sy-subrc NE 0.
    ENDIF.
    ENDFORM.
    CORECT ANSWERS WILL BE HIGHLY APPRECIATED AND SURELY REWARED .
    THANKS ,
    AMIT RANJAN

    Hi,
    Try this code. hope it will work.
    DATA: DOCKING TYPE REF TO CL_GUI_DOCKING_CONTAINER,
          PICTURE_CONTROL_1 TYPE REF TO CL_GUI_PICTURE,
          URL(256) TYPE C,
          PIC_DATA TYPE TABLE OF W3MIME WITH HEADER LINE,
          PIC_SIZE TYPE I.
    SELECTION-SCREEN BEGIN OF BLOCK B1.
    PARAMETERS: A(4) DEFAULT '4' .
    PARAMETERS: B(4) DEFAULT '5' .
    SELECTION-SCREEN END OF BLOCK B1.
    AT SELECTION-SCREEN OUTPUT.
      PERFORM SHOW_PIC.
    *&      Form  SHOW_PIC
    FORM SHOW_PIC .
      CREATE OBJECT PICTURE_CONTROL_1
    EXPORTING PARENT = DOCKING.
      CHECK SY-SUBRC = 0.
      CALL METHOD PICTURE_CONTROL_1->SET_3D_BORDER
        EXPORTING
          BORDER = 5.
      CALL METHOD PICTURE_CONTROL_1->SET_DISPLAY_MODE
        EXPORTING
          DISPLAY_MODE = CL_GUI_PICTURE=>DISPLAY_MODE_STRETCH.
      CALL METHOD PICTURE_CONTROL_1->SET_POSITION
        EXPORTING
          HEIGHT = 200
          LEFT   = 100
          TOP    = 20
          WIDTH  = 400.
    CHANGE POSITION AND SIZE ABOVE**************************
      IF URL IS INITIAL.
        CALL FUNCTION 'DP_CREATE_URL'
          EXPORTING
            TYPE     = 'image'
            SUBTYPE  = CNDP_SAP_TAB_UNKNOWN
            SIZE     = PIC_SIZE
            LIFETIME = CNDP_LIFETIME_TRANSACTION
          TABLES
            DATA     = PIC_DATA
          CHANGING
            URL      = URL
          EXCEPTIONS
            OTHERS   = 1.
      ENDIF.
      CALL METHOD PICTURE_CONTROL_1->LOAD_PICTURE_FROM_URL
        EXPORTING
          URL = 'file://D:\img.jpg'.
    ENDFORM.                    " SHOW_PIC

  • How to  upload and display image using bsp application

    hi
    I  just wants to know that
    1- how to  upload image from BSP page with attachment into sap server .?
    2-how to display image in to BSP page(webpage).
    thanks

    Hello Gupta Prashant,
    Just to upload and display an image, import image in MIME repository. Not only still images but also flash files can also be uploaded in the MIME repository. Once you import the image in it, use normal html code for image call;
    <img src = "file.jpg/gif" width=  height=>
    Besides it, if your requirement is to store the image in the database and fetch it based on specified field-name, then you have to go for BLOBs i.e Binary Large Object, using this you can also store images, videos, pdfs, applications in the database.
    MBLOB - Medium BLOBs store videos and pdfs,
    LBLOB  - Large BLOBs store movie files and applications.
    You have got 2 ways to use it; some databases store BLOB objects into themselves and some store the path of the BLOB object maintained on the FTP server.
    You can also implement it in ABAP;
    read the following link and practice the tutorial;
    [ Use of MIME Types|http://help.sap.com/saphelp_45b/helpdata/en/f1/b4a6c4df3911d18e080000e8a48612/content.htm]
    also check this
    [TYPES - LOB HANDLE|http://help.sap.com/abapdocu/en/ABAPTYPES_LOB_HANDLE.htm]
    And looking at your question, in order to upload an image, you can make use of FILEUPLOAD tag provided by HTMLB.
    Step 1: FILEUPLOAD provides a browse button to choose desired image file.
    Step 2: Store that image in database using BLOBs.
    Step 3: Retrieve the image using normal select query and display it on the screen.
    Hope it helps you,
    Zahack

  • Problem in displaying images stored in Blob variable

    Hi all,
    I have a requirement where i need to retrieve the image stored in Blob variable in DB and display the image in JSP page.
    I have written the below code to achieve this, it works fine
    In JSP, I am calling a action in the <img tag
    <img src='downloadPhoto.page?method=getPhotoInBytes&accessoryModelPictures.id.accessoryNumber=${photo.id.accessoryNumber}/> In my controller class
    InputStream inputStream=accessoryPicturesLOB.getPicture().getBinaryStream();
    byte[] theBytes = new byte[inputStream.available()];
    inputStream.read(theBytes);
    response.setContentType("image/jpg");
    response.getOutputStream().write(theBytes);But the problem is, *if i right click on the image and select save picture as option i get a error saying "The system cannot find the specified file "*
    Can you please tell me what is wrong in my approach/code
    Is there any better approach to display image that is store in Blob variable ?
    Please help on this.
    Thanks in advance.

    You need at least to set the filename in the content disposition header.

  • Tab canvas does not put the items in their specified positions

    Hi all,
    I have created a form with a tab canvas with three tab pages, each page has it's own text items.
    I saved this form without any problems.
    When i open this form again, i found that, some of the items in the first tab page are not put in their positions in this page, although the x position and y position is still correct in the property pallette.
    i overcome this by moving these items with the mouse to any direction and returning it back, but the problem comes after saving and trying to open the form again.
    Not : this occures only in the first tab page, i tried to swap the second tab page(page7) with the first tab page (page6), now the problem occures with page7(which became the first after swap) .
    Please help

    Yes, the items are in a frame.
    Both automatically and locked for the frame upate layout property causes the problem.
    I want to tell that the form in run time is ok, but in the forms builder the text items are not in their specified positions.
    Then when changing any property for the items even if it was not related to the item position, the item is then displayed in the correct position.

  • How to adjust R/W rules to display images inline?

    Hi all,
    out of the box, when I insert an image in a paragraph (DITA 1.2) then FrameMaker 12 uses the "below line" display setting. I need to display it inline, at the insertion point.
    When I adjust the settings of the anchored frame then the inline setting is lost when saving the XML file. So evidently I need to adjust the R/W rules.
    I tried to add a corresponding inline rule but had no success so far, does anybody know what needs to be done? It seems like a quite common requirement to display images inline.
    Robert

    Robert, Scott,
         I just did a non-DITA test of the r/w rule:
             element "Image" {
          is fm graphic element;
          attribute "placement" {
            is fm property position;
            value "inline" is fm property value inline;
            value "break" is fm property value bottom;
         My test document had two Image elements, one positioned at the insertion point, one at the bottom of the column. In both cases, the placement attribute was set correctly when I saved the document as XML and interpreted correctly when I opened the XML document.
        Robert, does your EDD define the placement attribute? If so (and you want to keep it), you need to add the subrule
            is fm attribute;
    to the attribute subrule. However, since setting the attribute in the FM document does not affect the anchored frame position, so I recommend deleting the attribute from the EDD. The r/w rule I suggest assumes the attribute is XML-only.
        Before you make that change, though, I wonder if the value "inline" appears in italics in the Structure View. Italics indicates the default value for an attribute that has not been set. That would explain why you see the value in the Structure View but not in the attribute editor.
             --Lynne

  • Css style sheet will not display images

    If i hardcode my style into the Login header.
    Change my body to reflect my html changes for div tags
    the login displays the way I want.
    If I remove my style and link to an uploaded style doing the following.
    <link rel="stylesheet" href="#WORKSPACE_IMAGES#SAMPLE2A.css" type="text/css">
    the images do not display. Everything else from the style sheet works
    just the images do not.
    I am doing the following to display the images
    #header {background: url("#WORKSPACE_IMAGES#testheader.png") no-repeat; width: 743px; height: 123px; position: relative;}
    is "#WORKSPACE_IMAGES#testheader.png" correct way to display images when doing css
    Howard

    #WORKSPACE_IMAGES# is not substituted in files, such as css at runtime, only in the page template (and other places in apex). The best way that I've found is to define the bulk of your classes in a .css, and only the image attributes in the page template header. Or, you can just store everything on the filesystem in Apache and use relative paths.
    Tyler

  • Display Images stored on filesystem

    Hello,
    I have stored photos (JPEG images) in my OS filesystem and trying to create album to view them using BFILE datatype and stored procedure. I would like to diaply one photo on each page withlinks to next and previous photos. I was able to make this working but have still following issues.
    - It only shows image for first row. For other rows, the strored procedure doesn't even run.
    - The 'Layout and pagination' for report displays more rows on each page, even if I specify "Number of Rows" as 1.
    Could you help me fix these issues? Also, if you have better way to do it, I am willing to try.
    Thanks.
    Following are more details of my setup.
    Using Oracle Application Express 3.1.1.00.09 with Oracle 11g on RedHat server.
    Table description:
    SQL> desc swiss_photos
    Name Null? Type
    PHOTO_ID NOT NULL NUMBER
    PHOTO BINARY FILE LOB
    FILENAME VARCHAR2(255)
    MIMETYPE VARCHAR2(255)
    UPDATE_DATE DATE
    DESCRIPTION VARCHAR2(400)
    Sample data in table:
    SQL> select photo_id, photo, filename from swiss_photos
    PHOTO_ID PHOTO FILENAME
    3 bfilename('PHOTO_DIR', '2008-0 2008-05-16/img_2101.jpg
    5-16/img_2101.jpg')
    2 bfilename('PHOTO_DIR', '2008_0 2008_05_16/img_2100.jpg
    5_16/img_2100.jpg')
    Proceduer to display image:
    SQL> select text from user_source where name='DISPLAY_EASY_IMAGE' order by line;
    TEXT
    procedure display_easy_image( p_id number ) as
    s_mime_type varchar2(48);
    n_length number;
    s_filename varchar2(400);
    bfile_loc bfile;
    begin
    s_mime_type := 'image/jpeg';
    --INSERT code to verify if procedure gets executed
    insert into test_dei values (p_id);
    commit;
    select mimetype, dbms_lob.getlength(photo), filename, photo
    into s_mime_type, n_length, s_filename, bfile_loc
    from swiss_photos
    where photo_id = p_id;
    owa_util.mime_header(nvl(s_mime_type,'application/octet'), FALSE );
    htp.p( 'Content-length: ' || n_length );
    htp.p( 'Content-Disposition: filename="' || s_filename || '"' );
    owa_util.http_header_close;
    wpg_docload.download_file(bfile_loc);
    end display_easy_image;
    HTML expression of "PHOTO_ID" column for report:
    <img src="#OWNER#.display_easy_image?p_id=#PHOTO_ID#" width="700" height="700" />

    Hello,
    I have stored photos (JPEG images) in my OS filesystem and trying to create album to view them using BFILE datatype and stored procedure. I would like to diaply one photo on each page withlinks to next and previous photos. I was able to make this working but have still following issues.
    - It only shows image for first row. For other rows, the strored procedure doesn't even run.
    - The 'Layout and pagination' for report displays more rows on each page, even if I specify "Number of Rows" as 1.
    Could you help me fix these issues? Also, if you have better way to do it, I am willing to try.
    Thanks.
    Following are more details of my setup.
    Using Oracle Application Express 3.1.1.00.09 with Oracle 11g on RedHat server.
    Table description:
    SQL> desc swiss_photos
    Name Null? Type
    PHOTO_ID NOT NULL NUMBER
    PHOTO BINARY FILE LOB
    FILENAME VARCHAR2(255)
    MIMETYPE VARCHAR2(255)
    UPDATE_DATE DATE
    DESCRIPTION VARCHAR2(400)
    Sample data in table:
    SQL> select photo_id, photo, filename from swiss_photos
    PHOTO_ID PHOTO FILENAME
    3 bfilename('PHOTO_DIR', '2008-0 2008-05-16/img_2101.jpg
    5-16/img_2101.jpg')
    2 bfilename('PHOTO_DIR', '2008_0 2008_05_16/img_2100.jpg
    5_16/img_2100.jpg')
    Proceduer to display image:
    SQL> select text from user_source where name='DISPLAY_EASY_IMAGE' order by line;
    TEXT
    procedure display_easy_image( p_id number ) as
    s_mime_type varchar2(48);
    n_length number;
    s_filename varchar2(400);
    bfile_loc bfile;
    begin
    s_mime_type := 'image/jpeg';
    --INSERT code to verify if procedure gets executed
    insert into test_dei values (p_id);
    commit;
    select mimetype, dbms_lob.getlength(photo), filename, photo
    into s_mime_type, n_length, s_filename, bfile_loc
    from swiss_photos
    where photo_id = p_id;
    owa_util.mime_header(nvl(s_mime_type,'application/octet'), FALSE );
    htp.p( 'Content-length: ' || n_length );
    htp.p( 'Content-Disposition: filename="' || s_filename || '"' );
    owa_util.http_header_close;
    wpg_docload.download_file(bfile_loc);
    end display_easy_image;
    HTML expression of "PHOTO_ID" column for report:
    <img src="#OWNER#.display_easy_image?p_id=#PHOTO_ID#" width="700" height="700" />

  • Is it possible not to download/display images ?

    When the connection is low, it would be convenient not to download images from the websites. Is there a way to do this ?

    Look at the following information. If this seems to be what you want, then you can un-check an option:
    *'''''Load images automatically:''' Firefox displays images in web pages by default. Uncheck this option to disable images in web pages. If you enable loading images automatically, the Exceptions... button lets you select sites from which images will not automatically load. '''The Exceptions... button lets you specify websites that you wish to load (or not load) regardless of the setting of this preference. In the exceptions list, enter the site from which you want to allow or block images and click Allow to allow images, or click Block to block the images. '''''
    *the above is from this article --> https://support.mozilla.org/en-US/kb/Options%20window%20-%20Content%20panel
    <u>To NOT automatically load images on all websites:</u> Firefox button > Options > Options (or Tools > Options) > Content, '''''un-check''''' "Load images automatically"
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''

  • I want resize the image and set position after retrieving from oracle datab

    How can I display image on web page after retrieving it from oracle database. Display is not problem but resize that image and position is very dificult .Please send me Guideline about blob object todisplay and resize it in web pages

    I tried to do the suggetion made by you but I was not able to solve the issue. I think I am close to it and with your help I should be able to resolve it. Let me explain you the brief about this issue.
    1. Another group uses Oracle Apex to load the images in to the database.
    2. I am fetching this data fron Oracle and displays in to Webpage using PHP.
    This is so far I tried. Please bear with me if I am doing anything wrong.
    1.I created program.php which calls the <IMG> as suggested by you.Snippet of the code is
    <div><img src="/oracle/image_story.php" alt="Image Stories" width="900" height="500" /></div>
    2. In the image_story.php, I used the following code.
    <?php
    $query = "SELECT *
              FROM IMAGE_STORY WHERE image_id = 50";
    if ($result = run_oracle($query, 'select')) { // Run the query.
         $num_results = count($result);
         if ($num_results > 0) {
         foreach($result as $row){
              $img = $row['DOCUMT']->load();
              header("Content-type: image/pjpeg");
              echo $img;
              //echo '<div><img src="'.$img.'" alt="Image Stories" width="900" height="500" /></div>';
    ?>
    When I run the program.php,Image is not displayed and it is showing as "X". To troubleshoot the issue,I run the image_story.php and echo $img is giving me the weird character like,
    "ÿØÿàJFIFddÿìDuckyPÿîAdobedÀÿÛ„          
    I used PL/SQL developer as a client to access the BLOB field from the database and in the HTML view, it is giving me the same output.
    Select * from image_story a where a.image_id = 50
    I am not sure the issue is with the MIME-TYPE,ENCODING or I am missing something here. I tried lot of Content-Type.
    Please guide me.

  • Displaying images that are accessed through URL

    Hi,
    I have trouble displaying images that are accessed through URLs in my report.
    If I call the URL directly in the Browser the Image can be opened without problems.
    The images can be accessed with an anonymous access.
    When I deploy the report or in the Preview of Visual Studio I get the following message:
    [rsWarningFetchingExternalImages] Images with external URL references will not display if the report is published to a report server without an UnattendedExecutionAccount or the target image(s) are not enabled for anonymous access.
    In Layout View of Visual Studio the image is showen correctly.
    The Images are stored on a Solaris maschine with WebSphere 6.0 as WebServer.
    Any ideas?
    Thank you.
    Frank
     

     Rain3 wrote:
    * Create a new IIS Virtual Directory pointing to the share:
    ** Open IIS Manager on the reporting server (eg. REPORTSERVER ):
    ** Create a new Virtual Directory (Web Sites --> Default Web Site --> New --> Virtual Directory)
    ** In the Alias prompt, type some name (eg. Pics) and in the Path prompt, specify \\SERVER\imageshare . Other options should be left default.
    * When designing reports, use "http://REPORTSERVER/Pics/somepicture.jpg" as the "Value" property for images.
    I have followed these steps but I still can not get the images to display.
    Our reportserver resides in the directory of another website rather than the default site.  I would assume that I would still follow the same procedure that you have listed but it did not help.
    Does anyone have any other recommendations?

  • Open and display image in MVC layout

    Hello!
    I cant figure out how I shall do this in an MVC layout:
    The program request user to open an image file that are then displayed in a JLabel
    My setup at the moment resolve in a nullpointerexeption because it dont get any actual image file, but I dont understand what I have missed.
    I can not post the whole code fo you to run because it is to big, so I post the part that are the most important. please have a look.
    PicturePanel
    //Import Java library
    import javax.swing.*;
    import java.awt.*;
    public class PicturePanel extends JPanel {
         //Variables
         private ImageIcon picture;
         //Method to get information of the selected file
         PicturePanel (String fileName) {
              picture = new ImageIcon (fileName); //Get the filename
              int w = picture.getIconWidth(); //Get the image with
              int h = picture.getIconHeight(); //Get the image height
              //Set preferable size for the image (Use the properties for the selected image)
              setPreferredSize(new Dimension(w, h));
              setMinimumSize(new Dimension(w, h));
              setMaximumSize(new Dimension(w, h));
         //Method to draw the selected image
         protected void paintComponent(Graphics g) {
              super.paintComponent(g); //We invoke super in order to: Paint the background, do custom painting.
              g.drawImage(picture.getImage(), 0, 0, this); //Draw the image at its natural state
    }From my model:
    //Local attributes
         boolean check = false; //Used to see if a statement is true or not
         PicturePanel pp;
         JFileChooser fc;
         int returnVal;
    //newFile in File menu
         public void newFile() {
              //Open a file dialog in users home catalog
              fc = new JFileChooser();
              //In response to a button click:
              returnVal = fc.showOpenDialog(pp);
              System.out.println("You pressed new in file menu");
         }From my controler:
    //User press "New" in File menu
              else if (user_action.equals("New")) {
                   //Call method in model class
                   model.newFile();
                   //Update changes
                   if (model.returnVal == JFileChooser.APPROVE_OPTION) {
                        System.out.println("Hello1");
                        File f = model.fc.getSelectedFile();
                        if (model.pp != null)     
                             model.pp = new PicturePanel(f.getAbsolutePath());
                        System.out.println("Hello2");
                        //Display image (Here is line 83)
                        view.setImage_DisplayArea(model.pp);
                        System.out.println("Hello3");
              }From my view:
    //Sets the image to be displayed on the image_display area (Here is line 302)
         public void setImage_DisplayArea(PicturePanel pp) {
              image_display.add(pp);
         }The complet error:
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
         at java.awt.Container.addImpl(Container.java:1015)You pressed new in file menu
    Hello1
    Hello2
         at java.awt.Container.add(Container.java:351)
         at View_Inlupp2.setImage_DisplayArea(View_Inlupp2.java:302)
         at Control_Inlupp2.actionPerformed(Control_Inlupp2.java:83)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1882)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2202)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.AbstractButton.doClick(AbstractButton.java:334)
         at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1050)
         at apple.laf.CUIAquaMenuItem.doClick(CUIAquaMenuItem.java:119)
         at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1091)
         at java.awt.Component.processMouseEvent(Component.java:5602)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3129)
         at java.awt.Component.processEvent(Component.java:5367)
         at java.awt.Container.processEvent(Container.java:2010)
         at java.awt.Component.dispatchEventImpl(Component.java:4068)
         at java.awt.Container.dispatchEventImpl(Container.java:2068)
         at java.awt.Component.dispatchEvent(Component.java:3903)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4256)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3936)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3866)
         at java.awt.Container.dispatchEventImpl(Container.java:2054)
         at java.awt.Window.dispatchEventImpl(Window.java:1801)
         at java.awt.Component.dispatchEvent(Component.java:3903)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)Edited by: onslow77 on Dec 16, 2009 5:00 PM
    Edited by: onslow77 on Dec 16, 2009 5:04 PM

    Hello again!
    Anyone that can help me figure out how to implement this in an MVC layout, I feel stuck.
    I post a little program that open and display an image file so that you better can understand what I whant to do.
    ShowImage
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.File;
    import javax.swing.filechooser.*;
    public class ShowImage extends JFrame{
         //Variables
         JFileChooser fc = new JFileChooser();
         PicturePanel pp = null;
         ShowImage () {
              super("Show"); //Title
              //Create the GUI
              JPanel top = new JPanel();
              add(top, BorderLayout.NORTH);
              JButton openBtn = new JButton("Open");
              top.add(openBtn);
              openBtn.addActionListener(new Listner());
              //Settings for the GUI
              setDefaultCloseOperation(EXIT_ON_CLOSE);
              pack();
              setVisible(true);
         class Listner implements ActionListener {
              public void actionPerformed(ActionEvent ave) {
                   int answer = fc.showOpenDialog(ShowImage.this);
                   if (answer == JFileChooser.APPROVE_OPTION){
                        File f = fc.getSelectedFile();
                        //Check
                        System.out.println(f);
                        System.out.println(pp);
                        if (pp != null)
                             remove(pp); //Clean so that we can open another image
                        //Check
                        System.out.println(pp);
                        //Set the PicturePanel
                        pp = new PicturePanel(f.getAbsolutePath());
                        //Check
                        System.out.println(pp);
                        //Add PicturePanel to frame
                        add(pp, BorderLayout.CENTER);
                        validate();
                        pack();
                        repaint();
         //Main
         public static void main(String[] args) {
              new ShowImage();
    }PicturePanel
    //Import Java library
    import javax.swing.*;
    import java.awt.*;
    public class PicturePanel extends JPanel {
         //Variables
         private ImageIcon picture;
         //Method to get information of the selected file
         PicturePanel (String fileName) {
              picture = new ImageIcon (fileName); //Get the filename
              int w = picture.getIconWidth(); //Get the image with
              int h = picture.getIconHeight(); //Get the image height
              //Set preferable size for the image (Use the properties for the selected image)
              setPreferredSize(new Dimension(w, h));
              setMinimumSize(new Dimension(w, h));
              setMaximumSize(new Dimension(w, h));
         //Method to draw the selected image
         protected void paintComponent(Graphics g) {
              super.paintComponent(g); //We invoke super in order to: Paint the background, do custom painting.
              g.drawImage(picture.getImage(), 0, 0, this); //Draw the image at its natural state
    }//The endEdited by: onslow77 on Dec 16, 2009 7:30 PM

Maybe you are looking for

  • Help needed regarding font sizes

    Iam generating pdf documents using oracle developer's report builder. When i generate and view those pdf's using the web previewer thay appear to be quite fine,whereas when i host them on ias the font sizes gets bigger, thus lot of text gets truncate

  • TS1389 i cant open my itunes account it keeps giving me an error

    I keep getting an error message stating reinstall or something is missing and cant open it up????

  • Display the reports in web browser?

    I need advise.. Here is my requirements. we are using Oracle9i database. We have data warehouse Schema. We wanted to display some of the reports in the browser. What are the possible solutions to display the reports in web browser with out using any

  • Any standard function module to read data from a cube

    Hi, I want to read data from a cube say XYZ, into an internal table. Is there any standard function module to do this? If so can anyone plz tell me what change should i make in the function module for my requirement. Regards BW Fresher.

  • Finder no responde, parpadea y solicita restaurar ventanas

    Finder salta, parpadea ventana que no deja seleccionar e indica "La aplicación Finder se ha cerrado al intentar restaurar las ventanas. ¿Desea intentar restaurar las ventanas de nuevo?" Ninguno de los dos botones (No restaurar ventanas / Restaurar ve