Displaying Images in my GUI

I have created a GUI that lets me display images that a user selects from a file. However is it possible to display an image that has not yet been written to a file?
I have a class that takes an image object, perfoms operations on it then maps this to a new image object. Would it be possible to display this image before it has actually been written to file? If anyone out there has ideas i'll be very grateful.
Here is an example of how I map one image to another:
     // Creates an image object.
     MyImage imageRight = new MyImage();
     // Now read in the image file
// Create new object for reading image
     MyImage imageCenter = new MyImage(imageRight.getWidth(), imageRight.getHeight());
/* Copy the pixel information from image that was read in to the
     new image */
     for (int y = 0; y < imageRight.getWidth(); y++) {
               for (int x = 0; x < imageRight.getHeight(); x++) {
          /* Get the values from imageOne */
          int red = imageRight.getRed(x,y);
          int green = imageRight.getGreen(x,y);
          int blue = imageRight.getBlue(x,y);
          /* Put these values into imageTwo */
          imageCenter.setRGB(x, y, red, green, blue);
At this point before I write the file, you can see that imageCenter holds all the attributes of an image. Now can I display this image object in my GUI?
I hope someone can help me as this is really important.
Thanks again.

Look into the graphics's drawimage method.
;o)
V.V.

Similar Messages

  • 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

  • Help with displaying images (gif, jpeg...) within a JFrame (or similar)

    Hi all,
    i'm new to the forum and i'll be granted if you kind gentlemen/women could use some advices for my gui home application.
    My purpose is to display a static image in a container (i'd prefer to use javax.swing objects, but if you think that java.awt is more suitable for my app, please feel free to tell me about...). I used a modified code from one of the Java Tutorial's examples, tht actually is an applet and displays images as it is using the paint() method. I just can't realize how to set the GraphicContext in a JFrame or a JPanel to contain the image to display, without using applets. Following part of the code I use (a JButton will fire JApplet start, JApplet is another class file called Apple.java):
    class DMToolz extends JFrame {
         private static final long serialVersionUID = 1L;
         private JPanel jContentPane = null;
         private JButton jButton = null;
         private JComboBox jComboBox = null;
         private JMenuItem jMenuItem = null;
         private JMenuBar jJMenuBar = null;
         private JMenu jMenu = null;
         private JMenu jMenu1 = null;
         public int w=10, h=10;
         public String filename;
          * @throws HeadlessException
         public DMToolz() throws HeadlessException {
              // TODO Auto-generated constructor stub
              super();
              initialize();
         public DMToolz(String arg0) throws HeadlessException {
              super(arg0);
              // TODO Auto-generated constructor stub
              initialize();
          * This method initializes jButton
          * @return javax.swing.JButton
         private JButton getJButton() {
              if (jButton == null) {
                   jButton = new JButton();
                   jButton.setBounds(new Rectangle(723, 505, 103, 38));
                   jButton.setText("UrcaMado'");
                   jButton.addActionListener(new java.awt.event.ActionListener() {
                        public void actionPerformed(java.awt.event.ActionEvent e) {
    /**************SCRIVERE QUI IL NOME DEL FILE CON L'IMMAGINE DA CARICARE*******************/
                             filename = "reference table player2.gif";
                           java.net.URL imgURL = DMToolz.class.getResource("images/"+filename);
                           BufferedImage img = null;
                           try {
                                img =  ImageIO.read(imgURL);
                               w = img.getWidth();
                               h = img.getHeight();
                               System.out.println("*DM* Immagine letta - W:"+w+" H:"+h);
                            } catch (Exception ex) {System.out.println("*DM* Immagine non letta");}
                           JApplet a = new Apple();
                           a.setName(filename);
                           JFrame f = new JFrame ("UrcaBBestia!");
                           f.addWindowListener(new WindowAdapter() {
                               public void windowClosing(WindowEvent e) {System.exit(0);}
                           f.getContentPane().add(a);
                           f.setPreferredSize( new Dimension(w,h+30) );//30 � (circa) l'altezza della barra del titolo del frame
                               f.pack();
                             f.setVisible(true);                      
              return jButton;
    public class Apple extends JApplet {
         private static final long serialVersionUID = 1L;
        final static Color bg = Color.white;
        final static Color fg = Color.black;
        final static Color red = Color.red;
        final static Color white = Color.white;
        public void init() {
            //Initialize drawing colors
            setBackground(bg);
            setForeground(fg);
        public void paint(Graphics g) {
            Graphics2D g2 = (Graphics2D) g;
            g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
            try {
                 String filename = this.getName(); //uso il nome dell'applet come riferimento al nome del file da caricare
                 java.net.URL imgURL = DMToolz.class.getResource("images/"+filename);
                 BufferedImage img =  ImageIO.read(imgURL);
                 if (img.equals(null)) {System.out.println("IMG null!");System.exit(0);}
                System.out.println("IMG letta");
                int w = img.getWidth();
                int h = img.getHeight();
                resize(w,h);
                g2.drawImage(img,
                            0,0,Color.LIGHT_GRAY,
                            null);// no ImageObserver
             } catch (Exception ex) {ex.printStackTrace();
                                          System.out.println("Immagine non letta.");System.exit(0);}
    }//end classPlease never mind about some italian text, used as reminder....
    Thanks in advance.

    Read the Swing tutorial on "How to Use Labels" or "How to Use Icons" for working examples:
    http://java.sun.com/docs/books/tutorial/uiswing/TOC.html
    By the way you should never override the paint() method. Custom painting (not required in this case) is done by overriding the paintComponent(...) method in Swing. Overriding paint() is an old AWT trick.

  • Won't display images - Its probably something simple!

    Hey ,
    Ive been trying for ages, looked throught the tutorials (i have even tried just using java pasted from the site for one of the simple programs) and looking through old forum questions but can't find out why my GUI wont display images. It compiles fine but then when i run the program ... no pics!
    I suspect its something to do with the directory, i have tired:
    - putting the images in the same directory as the java classes,
    - putting in the entire image location paths (for this i get illegal characters error because it has '\' in the path but i get round this using '\\' ) but still no joy.
    Like i said am just using the example programme from the site so i know its correct, Any ideas??
    Thanx
    Lisa

    Here is a simple program to test:
    JFrame frame = new JFrame();
    JLabel label = new JLabel("image.jpg");
    frame.getContenPane()..add( label );
    frame.pack();
    frame.setVisible(true);a) Place "image.jpg" is the same directory as the source and class files.
    b) Don't use any package names for you class.
    c) Compile using javac, not through and ide or anything.
    d) Make sure your classpath includes ".", so it will search the current directory.

  • Displaying Images in EBS

    Hi,
    Does anybody know if it is possible to use the URL link against an invoice to display an image via UNC path (Oracle 11i)?
    I know it's possible to do this using a URL link through to a browser application but wondering if it's possible to just use the network file path so that the image opens in the native appication on the users machine (windows image viewer, abode etc.)
    Would this be the same method for dispaying images in iExpense too?
    Regards
    David

    Hi,
    I am having problem displaying images in my Jframe, I want to call a fuction that would connect to a URL web address and would retrieves images using URL web address.
    I would really apperciate it, if somebody can help me out.
    Here is the code:
    import java.awt.*;
    import java.lang.*;
    import java.util.*;
    import javax.swing.*;
    import java.io.*;
    import java.awt.image.*;
    import javax.imageio.*;
    import java.net.*;
    class myPanel extends JPanel
         private Gui myParent;
         public void setParent(Gui p){ myParent = p;
         public void paintComponent(Graphics g)
                    int x=100, y=40;      
                    super.paintComponent(g);
                    gigs Tempgigs;
                    for (java.util.Iterator nit=myParent.getgigsListIterator(); nit.hasNext();)
              System.err.print(".");
                    Tempgigs = (gigs) nit.next();
              g.setColor(Color.blue);
                    y+=10;
              g.drawString(Tempgigs.bands+ " " +Tempgigs.venue + " " +Tempgigs.city+ " " + Tempgigs.pc,x,y);
              public class ShowImage extends Panel
             BufferedImage  image;
           public ShowImage()
             try
          System.out.println("Enter image name\n");
           BufferedReader bf=new BufferedReader(new
         InputStreamReader(System.in));
            String imageName=bf.readLine();
           File input = new File(imageName);
               image = ImageIO.read(input);
         catch (IOException ie)
          System.out.println("Error:"+ie.getMessage());
           public void paint(Graphics g)
             g.drawImage( image, 0, 0, null);
    }

  • Display image in full screen

    Hi everyone, I am a newbie for labview. I just wanna ask you about image display in labview. Now I can display one image in my front panel. I open the file path and display it. First thing I wanna do is that is it possible to display on monitor full screen not on front panel and second thing is that how can I display images in folder and display it about 2 seconds delay in between? Pls kindly help me.
    Thanks millions.
    Solved!
    Go to Solution.

    Hi there, 
    -I don't know whether the image full display can be possible or not, Any reason why you are asking for such requirement?
    -The other question about reading files in a folder and display for 2sec can be done like shown in image.
    -I've attached vi in lv 12 if needed.
    -Next time, please post your vision related queries in Machine vision Board.
    Thanks
    uday,
    Please Mark the solution as accepted if your problem is solved and help author by clicking on kudoes
    Certified LabVIEW Associate Developer (CLAD) Using LV13
    Attachments:
    Image_read_folder.vi ‏43 KB

  • Display image in java.awt.List

    hello guys,
    How i can display image in java.awt.List means listbox. give me sample code. if you have
    Waiting for your favorable reply.
    Regards,
    Bhavesh Kharwa

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

  • How to create a report in Form line Style and can display Image field?

    Hi,
    In Report builder 10g, I would like to create a Report with Form Line Style and this report included a Image field.
    I can choose this Style only when Select Report type is Paper Layout. Because, If I choose Create both Web & Paper Layout or Create Web Layout only then in the next Style tab 03 option Form, Form letter and Mailing Label be Disabled.
    But in Paper Layout, my report can not display Image field.
    I tried with Web layout and all the other Styles (Except 03 mentioned be Disabled) then all Styles are displayed Imager field OK.
    How to create a report in Form line Style and can display Image field?
    I was change File Format property of my Image field from text to Image already in Property Inspector. But report only showed MM for my Image field.
    Thanks & regards,
    BACH
    Message was edited by:
    bachnp

    Here you go..Just follow these steps blindly and you are done.
    1) Create a year prompt with presentation variable as pv_year
    2) Create a report say Mid report with year column selected 3 times
    - Put a filter of pv_year presentation variable on first year column with a default value say @{pv_year}{2008}
    - Rename the second time column say YEAR+1 and change the fx to CAST(TIME_DIM."YEAR" AS INT)+1
    - Rename the second time column say YEAR-1 and change the fx to CAST(TIME_DIM."YEAR" AS INT)-1
    Now when you will run Mid Report, this will give you a records with value as 2008 2009 2007
    3) Create your main report with criteria as Year and Measure col
    - Change the fx for year column as CAST(TIME_DIM."YEAR" AS INT)
    - Now put a filter on year column with Filter based on results of another request and select these:
    Relationship = greater than or equal to any
    Saved Request = Browse Mid Report
    Use values in Column = YEAR-1
    - Again,put a filter on year column with Filter based on results of another request and select these:
    Relationship = less than or equal to any
    Saved Request = Browse Mid Report (incase it doesn't allow you to select then select any other request first and then select Mid Report)
    Use values in Column = YEAR+1
    This will select Year > = 2007 AND Year < = 2009. Hence the results will be for year 2007,2008,2009
    This will 100% work...
    http://i56.tinypic.com/wqosgw.jpg
    Cheers

  • Problem Displaying Images in a JFrame

    I am writing a program that displays images on a JFrame window. I have been reading the other postings about this topic however I have not been able to make my code work. I am hoping there is some obvious solution that I am not noticing. Please help, I am very confused!
    public class WelcomeWindow {
    private JLabel label;
    private ImageIcon logo;
    public WelcomeWindow() {
    label = new JLabel();
    logo = new ImageIcon("/images/logo.gif");
    label.setIcon(logo);
    this.getContentPane().add(label);

    Instead of a JLabel, have you tried to use a JButton containing the Icon?
    Also (but I think you've done it already), you could do that :
    File iconFile = new File("/images/logo.gif");
    if (!iconFile.isFile()) {
    System.out.println("Not a file");
    That way you'll be certain that the path given is correct.
    Hope this helps.

  • Display image in sub_VI

    I am running a Linux (no NI Vision support) LabVIEW application where I have a “main” DAQ VI collecting raw u8 data. I want to be able to display the data as an image in a sub-VI. The first time I call the sub-VI to display the first image everything works fine, however, on the second and subsequent calls to the sub-VI I get an error saying that the sub-Vi is already open and needs to be closed before being called. I don’t have the screen space to adequately display images in the main VI and still have the DAQ controls visible.
    Is there a way to have one VI continuously collect and format image data and then display the data in a second VI?
    Thanks in advance

    Thank you for the reply
    In the example you provided the sub-VI is called, executes, and terminates. I need to be able to repeatedly call a sub-VI that does not terminate. I need to do this so that I can update an image and allow an operator to view the image (and perform event functions on the image such as mouse click).
    Is there a way for a main VI to call a sub-VI and not have to pend (wait) for the sub-VI to complete execution?
    Is there a way to call (i.e. pass data) to a sub-VI that is already running?
    Thank you again for your help

  • How can i Display images with may own table

    Hi
    I want display images with my own table. How can I use in this query.
    SELECT    '<a href="#" onclick="javascript:'
           || 'getImageHeight(''my_img'
           || '#ROWNUM#'');javascript:redirect'
           || '(''f?p=&APP_ID.:212'
           || ':&SESSION.:DISPLAY:NO::P212_IMAGE_ID:'
           || ID
           || ''');">'
           || '<img src="#IMAGE_PREFIX#edit.gif" '
           || 'alt="Edit"></a>' ID,
              '<img id="my_img'
           || '#ROWNUM#" src="#WORKSPACE_IMAGES#'
           || filename
           || '"/>' image
      FROM wwv_flow_filesThanks
    Nr
    Edited by: user10966033 on Sep 28, 2009 1:41 PM

    You don't use #workspace_images# since that is for STATIC files, not images in a table..
    see this thread for help: Re: Display image from blob
    Thank you,
    Tony Miller
    Webster, TX

  • Display image in classical report

    Experts,
    Please share how to display image stored in SO10 in to a  classical report??

    Hi
    check this
    In the transaction OAOR, you should be able to insert your company Logo.
    GOTO - OAOR (Business Document Navigator)
    Give Class Name - PICTURES Class Type - OT..... then Execute
    It will show you the list, then select ENJOYSAP_LOGO.
    On that list, you will find one control with a "create" tab.
    Click std. doc types.
    Select SCREEN and double-click.
    It will push FILE selection screen.
    Select your company logo (.gif) and press OK.
    It will ask for a description- for instance: "company logo".
    It will let you know your doc has been stored successfully.
    You can find your logo under ENJOYSAP_LOGO->Screen->company logo.
    Just run your ALV program, you should find your company logo in place of the EnjoySAP logo.
    FORM TOP-OF-PAGE.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    IT_LIST_COMMENTARY = HEADING[]
    I_LOGO = 'ENJOYSAP_LOGO'
    I_END_OF_LIST_GRID ='GT_LIST_TOP_OF_PAGE'.
    ENDFORM. "TOP-OF-PAGE
    Here 'ENJOYSAP_LOGO' will replace by ur created logo.
    Refer this link
    http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_enhanced.htm
    http://www.sap-img.com/abap/alv-logo.htm
    http://www.sap-img.com/fu002.htm
    Re: Logo on Login screen
    Re: To change image into main menu of sap
    Regards
    Anji

  • Display image in detail groups in jheadstart 11.1.1.3.35

    Hi, I've been trying to make a project that should display one picture in one of the detail groups. but when i generate the jheadstart definition editor and run the project, it shows an empty box for the image (image is not loaded).
    I've seen the source code and every thing seems right and when i use that detail group as a master group the image display just fine.
    is jheadstart 11g have a problem for displaying image in detail groups? because I've heard this option works in 10g pretty fine.
    please help me how i can fix this problem and i have to say my project deadline is coming :(

    We are not aware of such a problem.
    To really check whether it is related to a detail group, can you temporarily make the detail group a top-level group, generate and run your application to see whether the problem goes away?
    Make sure you first uncheck the Same Page checkbox before you drag and drop the detail group to become a top group.
    There is a known ADF issue that when you upload a new image, the new image is only shown when you restart the session.
    Steven Davelaar,
    JHeadstart Team.

  • Display image in view

    Hi,
    My requirement is to create a  web dynpro application where the first view contains all images stored in ECC along with one button (Display image). When the user clicks on the button Display image then another view should display the image on the screen.
    I have created View1 with a table,which display the details of the table STXBITMAPs in it,when i select a row and press a button second view is displayed with a UI conatiner of type IMAGE.
    Basiccaly when button on view1 is pressed, I get the value of the TDNAME field via lead_selection method and set this value to a global attribute, whch inturn is copied into second view and bonded to the SOURCE attribute of the UI element.
    My problem is , that global attribute is being updated probley and value have been passed to second view..but Image is not being displayed on the screen.
    Can anyone help me out in this.
    Thanks in advance.
    Pooja

    You don't necessarily have to move your images from STXBITMAPS to the MIME repository.  You can display any image - not just those in the MIME repository, by placing the content in the ICM Cache.  This creates a temporary URL for any content.  So you just need to read the binary content of the image from STXBITMAPS into a XSTRING variable.  From there you can use this code sample to put the content in the cache and generate a URL:
    ****Create the cached response object that we will insert our content into
      data: cached_response type ref to if_http_response.
      create object cached_response
        type
          cl_http_response
        exporting
          add_c_msg        = 1.
    *  cached_response->set_compression( options = cached_response->IF_HTTP_ENTITY~CO_COMPRESS_IN_ALL_CASES ).
    try. " ignore, if compression can not be switched on
          call method cached_response->set_compression
            exporting
              options = cached_response->co_compress_based_on_mime_type
            exceptions
              others  = 1.
        catch cx_root.
      endtry.
    ****set the data and the headers
      data: l_app_type type string.
      data: l_xstring type xstring.
          cached_response->set_data( me->gx_content ).
          l_app_type = 'image/x-ms-bmp'.
      cached_response->set_header_field( name  = if_http_header_fields=>content_type
                                         value = l_app_type ).
    ****Set the Response Status
      cached_response->set_status( code = 200 reason = 'OK' ).
    ****Set the Cache Timeout - 60 seconds - we only need this in the cache
    ****long enough to build the page and allow the IFrame on the Client to request it.
      cached_response->server_cache_expire_rel( expires_rel = i_cache_timeout ).
    ****Create a unique URL for the object
      data: guid type guid_32.
      call function 'GUID_CREATE'
        importing
          ev_guid_32 = guid.
      concatenate i_path '/' guid '.' i_format into r_url.
    ****Cache the URL
      cl_http_server=>server_cache_upload( url      = r_url
                                           response = cached_response ).

  • Display Image in Report

    Hi,
    I want to display image link in one of the columns in report.
    ex: if i click that image it should go to google maps.
    I stored the image in /res/s_protal/image.jpg and also in oc4j.
    I know to fmap to show it only once.
    but i want to reflect it in all the rows of a column.
    Things i tried:
    Stored in the same machine took the ip addres and prot and given as below it was working.
    But if i move it to other machines then it getting failed so again i want to update the machine ip.
    http://225.225.225.225:9704/analytics/res/s_proact/images/images.jpg
    Is there any possible way to give some common syntax so that the corresponding machine ip will be pointed once the
    report moved to different machines.
    Thanks,
    satheesh

    Hi Santeesh,
    I just saw your post and I thought I'd ask you with my query:
    I want to add some pop-up info on some of the data when the user hover on it. have you
    got a clue what do I need to do for that?
    Cheers,
    Yonatan

Maybe you are looking for

  • Daqmx, queue, and memory

    Hi all, I have a loop that would read the analog in buffer and put the data (24x1000 2d array /element) onto three queues (one for display, one for file I/O, and one for motion control).  It seems to be that this is very wasteful, but I can't think o

  • Error message downloading Acrobat Pro to my computer.

    While trying to download Acrobat Pro on my computer i received an error message: Error 2203 Database:C\windows\Installer\4a0748c.msp. Cannot open database file. System error - 2147287038. JPMorgan

  • Purchase Requisition "Document Overview"

    Dear, I do not want to let users use "Document Overview" on Purchase Requisition screen. So, I set "Document Overview On" buttun invisible by screen variant(SHD0 - menu function). But after using "Document Overview" on Purchase Order screen, it appea

  • MRP exception messages and SNP alerts

    Hi, During MRP run in R3 we used to get exception messages like Reschedule in and Reschedule out as per the planning situation. Now we are using APO SNP heuristic for planning and we are expecting same kind of messages to be given by SNP planning run

  • Safari Upload file dialog box lets me click links and buttons on parent window.

    Safari Upload file dialog box lets me click links and buttons on parent window. I can even click Choose file button and open multiple Upload File dialog boxes. How can I show Upload file dialog box as modal? Operating system: Windows 7 and Windows XP