How to display image at jpanel in application GUI

i wana load an image from given location to my GUI when application starts.
according to my perception this code should load image but its not working.
Will any body kindly help me and point out the "reasons" for not working following piece of code from my application.
public class MainFrame extends JFrame
JPanel jPanel1 = new JPanel();
JPanel jPanel2 = new JPanel();
JButton jButton1 = new JButton();
JButton jButton2 = new JButton();
Image image = Toolkit.getDefaultToolkit().createImage("c:\\form-3.jpg");
javax.swing.JScrollBar jScrollBar1 = new JScrollBar();
BorderLayout borderLayout1 = new BorderLayout();
public MainFrame()
try
jbInit();
} catch (Exception ex)
ex.printStackTrace();
public static void main(String[] args)
MainFrame mainFrame = new MainFrame();
private void jbInit() throws Exception
     //jbInit() defined here
public void paintComponent(Graphics g)
// jPanel1.getGraphics().drawImage(image,0,0,jPanel1);
Graphics2D g2D = (Graphics2D) g;
BufferedImage bi = (BufferedImage) createImage(getWidth(),getHeight());
bi.createGraphics().drawImage(image, 0,0, jPanel1);
// g.drawImage(image,0,0,jPanel1);
public void jButton2_mouseClicked(MouseEvent e)
     public void jButton1_mouseClicked(MouseEvent e)
this.dispose();
System.exit( 0 );
/////////////////////////////////////////////////////////////////////////////

this works OK
(stripped of everything unrelated to your question)
import javax.swing.*;
import java.awt.*;
class MainFrame extends JFrame
  Image image = Toolkit.getDefaultToolkit().createImage("test.gif");
  public static void main(String[] args)
    MainFrame mainFrame = new MainFrame();
    mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    mainFrame.setSize(200,200);
    mainFrame.setVisible(true);
  public void paint(Graphics g)//<-----heavyweight component
    super.paint(g);
    g.drawImage(image,50,50,this);
}

Similar Messages

  • How to display  image efficiently in JPanel.............

    i have following piece of code used to load and display image on jpanel when application starts.
    the problem is that
    image is not loaded efficiently,
    also it covers other panels added in frame.
    and scrollbar of panel does not work to show parts of image.
    i want to efficiently load the image and to fit in in my panel and also to scroll bar to work proper with image.
    looking for any nice suggestion
    public class MainFrame extends JFrame
    Image image = Toolkit.getDefaultToolkit().createImage("c:\\form-3.jpg");
    javax.swing.JScrollBar jScrollBar1 = new JScrollBar();
    BorderLayout borderLayout1 = new BorderLayout();
    JPanel jPanel1 = new JPanel();
    JPanel jPanel2 = new JPanel();
    JButton jButton1 = new JButton();
    JButton jButton2 = new JButton();
    public MainFrame()
    try
    {            jbInit();        } catch (Exception ex)
    {            ex.printStackTrace();        }
    public static void main(String[] args)
    MainFrame mainFrame = new MainFrame();
    jBInit Method defined here
    public void paint(Graphics g)
    g.drawImage(image,0,0,jPanel1);
    Message was edited by:
    @tif

    You have overided the paint method on JFrame then you are drowing on entire Frame.
    Instead you have to override the paintComponent method of a JPanel class or use a JLabel with the image

  • Displaying image on the swings application

    Hi All,
    I want to display images onto my swing application. I was using ImageIcon and Class to getResource(filename). It can only provide me images that i have placed in my package not outside my package.
    Please help me, how to to do?
    Thanks in advance.

    [url http://java.sun.com/docs/books/tutorial/uiswing/components/icon.html]How to Use Icons

  • How to display images and information

    how to display images and information(e.g. like questions) on a jsp page that stored in a database

    Look As far as i can see....
    Utlimately every file could be expressed as a bytes buffer.
    so say if you have a bean called Choice Bean which is expressed as
    public class ChoiceBean{
       private String choiceid;
       private String choicedesc;
       private byte image[];
       public void setChoiceId(String choiceid){
              this.choiceid = choiceid;
        public String getChoiceId(){
               return this.choiceid;
          public void setChoiceDesc(String choicedesc){
               this.choicedesc = choicedesc;
           public String getChoiceDesc(){
               return this.choicedesc;
           public void setImage(byte image[]){
                  this.image = image;
             public byte[] getImage(){
                  return this.image;
    }QuestionList.java:
    ===============
    public class QuestionList{
         private List<ChoiceBean> choicelist;
          /*Other member variable declarations*/
           public  List<ChoiceBean> getChoiceList(){
                    /*Custom code where you may build the list by querying the DA layer*/
                     return this.choicelist;
         public int search(String choiceid){
                 int index = -1;
                 for(int i =0 ; i < this.choicelist.size() ; i++){
                        ChoiceBean cb = this.choicelist.get(i);
                         if(cb.getChoiceId().equals(choiceid)){
                                index = i;
                                break;
                 return index;
        /* Other member method declarations */
    }and you are retreving List<ChoiceBean> from DB using your query & have created a session attribute / <jsp:useBean> named ChoiceList
    NOTE: sometimes your application server can go out of bounds as you are consuming a lot of memory by creating an arraylist object.
    use the following methodology to display images & choices
    sample.jsp:
    =========
    <jsp:useBean id="QuestionList"  class="com.qpa.dao.QuestionList" scope="session"/>
    <TABLE>
    <%
    /* QuestionList.getChoiceList() is a method which fetches data from the DB & returns it in form of  List<ChoiceBean> */
    List<ChoiceBean> choicelist = QuestionList.getChoiceList();
    for(int i =0 ; i < choicelist.size() ; i++){
    %>
    <TR>
    <TD><%!=choicelist.get(i).getChoiceId()%></TD>
    <!-- calling servlet which renders an images in JPG format based upon given choiceid(unique field) -->
    <TD><IMAGE src="ImageServlet?choiceid=<%!=choicelist.get(i).getChoiceId()%>"/> </TD>
    <TD><%!=choicelist.get(i).getChoiceDesc()%></TD>
    </TR>
    <%
    %>
    </TABLE>
    <%
        session.remove("QuestionList");
    %>
    NOTE: usage of JSTL or any other custom built tag-libraries makes life more simpler in the following case
    ImageServlet.java:
    ===============
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
            byte buffer[] = null;
            HttpSession session = request.getSession(false);
            /*getting the QuestionList from the session*/
            QuestionList ql = null;
            String choiceid = new String("");
            try{
                 choiceid = request.getParameter("choiceid");
                 /*getting the QuestionList from the session*/
                ql = (QuestionList)  session.getAttribute("QuestionList");
            } catch(Exception exp){
            if(choiceid.equals("") == false &&  ql != null ){
                List<ChoiceBean> clist = QuestionList.getChoiceList();           
                   assuming that you have created a serach method which searches the entire choice list and would give you
                   the index of that object which is being refered by unique choiceid and returns -1 if not found
                int index =  QuestionList.search(choiceid);
                if(index != -1){
                   ChoiceBean cb = clist.get(index);
                   buffer = cb.getImage();
            if(buffer != null){
                 // assuming that we have stored images in JPEG format only
                 JPEGImageDecoder decoder = JPEGCodec.createJPEGDecoder(new ByteArrayInputStream(buffer));
                 BufferedImage image =decoder.decodeAsBufferedImage();
                 response.setContentType("image/jpeg");
                 // Send back image
                 ServletOutputStream sos = response.getOutputStream();
                 JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(sos);
                 encoder.encode(image);
            } else {
               response.setContentType("text/html");
               response.getWriter().println("<b>Image data not found</b>");              
    }However,i still feel there are few loopholes with this approach where Application Server can eat up a lot of heap space which may result in outofmemorybound exception.
    Hope this might help :)
    REGARDS,
    RaHuL

  • How to add images into a java application (not applet)

    Hello,
    I am new in java programming. I would like to know how to add images into a java application (not an applet). If i could get an standard example about how to add a image to a java application, I would apreciated it. Any help will be greatly apreciated.
    Thank you,
    Oscar

    Your' better off looking in the java 2d forum.
    package images;
    import java.awt.*;
    import java.awt.image.*;
    import java.io.FileInputStream;
    import javax.imageio.ImageIO;
    import javax.swing.*;
    /** * LogoImage is a class that is used to load images into the program */
    public class LogoImage extends JPanel {
         private BufferedImage image;
         private int factor = 1; /** Creates a new instance of ImagePanel */
         public LogoImage() {
              this(new Dimension(600, 50));
         public LogoImage(Dimension sz) {
              //setBackground(Color.green);      
              setPreferredSize(sz);
         public void setImage(BufferedImage im) {
              image = im;
              if (im != null) {
                   setPreferredSize(
                        new Dimension(image.getWidth(), image.getHeight()));
              } else {
                   setPreferredSize(new Dimension(200, 200));
         public void setImageSizeFactor(int factor) {
              this.factor = factor;
         public void paintComponent(Graphics g) {
              super.paintComponent(g);
              //paint background 
              Graphics2D g2D = (Graphics2D) g;
              //Draw image at its natural size first. 
              if (image != null) {
                   g2D.drawImage(image, null, 0, 0);
         public static LogoImage createImage(String filename) { /* Stream the logo gif file into an image object */
              LogoImage logoImage = new LogoImage();
              BufferedImage image;
              try {
                   FileInputStream fileInput =
                        new FileInputStream("images/" + filename);
                   image = ImageIO.read(fileInput);
                   logoImage =
                        new LogoImage(
                             new Dimension(image.getWidth(), image.getHeight()));
                   fileInput.close();
                   logoImage.setImage(image);
              } catch (Exception e) {
                   System.err.println(e);
              return logoImage;
         public static void main(String[] args) {
              JFrame jf = new JFrame("testImage");
              Container cp = jf.getContentPane();
              cp.add(LogoImage.createImage("logo.gif"), BorderLayout.CENTER);
              jf.setVisible(true);
              jf.pack();
    }Now you can use this class anywhere in your pgram to add a JPanel

  • Display image in standalone AIR application

    I have loaded images and like to display image in standalone AIR application. But I cannot get it work. The code as follows:
    private function ImageLoader(url:String):void
    var request:URLRequest = new URLRequest(url);
    var loader:Loader = new Loader();
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loaderComplete);
    loader.load(request);    
    private function loaderComplete(event:Event):void
    var scaleFactor:Number = 1;
    var uic:UIComponent = new UIComponent();
    try
    var bmp:Bitmap = event.target.content as Bitmap;
    var bmd:BitmapData = bmp.bitmapData; //Bitmap(event.target.content).bitmapData;
    var scaledBMD:BitmapData = new BitmapData(400, 400);
    var matrix:Matrix = new Matrix();
    matrix.scale(scaleFactor, scaleFactor);
    scaledBMD.draw(bmd, matrix, null, null, null, true);
    uic.x = 40;
    uic.y = 40;
    uic.addChild(new Bitmap(scaledBMD));
    catch (errObject:Error)
    trace(errObject.message);

    Found answer by adding mx:Canvas and add
    iconCanvas.addChild(uic);
    after
    uic.addChild(new Bitmap(scaledBMD));
    <mx:Canvas id="iconCanvas" width="10" height="10" horizontalScrollPolicy="off" verticalScrollPolicy="off" x="0" y="0" clipContent="false"/>
    Is anyone create "Canvas" by using new Canvas and get it works? example:
    var canv:Canvas = new Canvas(...);

  • How to display images on my internal isight?

    Hi,
    I just bought the new iMac 2 gig dual. Running on 10.5.2.
    I wanted to know how to display images on my screen during a video conference chat without resorting to holding up a print out to the camera? I need something where I can switch from video mode to image mode and show a single image at a time if I need to. All that while still talking of coarse. If it isn't possible with my iSight software, can you point me to other software I can download and still use my built in cam?
    I hope I was clear enough in asking this.
    Thanks
    Liban

    Welcome to Apple Discussions, Liban
    iChat can do what you want, but I do not know of any web-based video chat site that can.
    Look for Help or Support information on the site you are using or ask the Webmaster if his site has the capability to do what you want.
    EZ Jim
    PowerBook 1.67 GHz w/Mac OS X (10.4.11) G5 DP 1.8 w/Mac OS X (10.5.2)  External iSight

  • How to display image?

    Hi all,
    How to display image from the database table in the adobe form by using web dynpro abap?
    I want to display image in the adobe interactive form by using web dynpro abap.
    Please help me.
    Regards,
    srini

    Hi Srini,
    If you go through the article you might have seen the following piece of code
    *** Send the values back to the node
      lo_el_z_if_test_cv->set_static_attributes(
        EXPORTING
          static_attributes = ls_z_if_test_cv ).
    " here ls_z_if_test_cv has the image in XSTRING format which has beeen retrived using METHOD get_bds_graphic_as_bmp of CLASS cl_ssf_xsf_utilities
    " In  your case you need to just use the select query n fetch it from your table; ( provided your image is store in XSTRING format )
    How is your image stored in your database table ?
    Regards,
    Radhika.

  • How to read bytes(image) from a server ?how to display image after read byt

    How to read bytes(image) from a server ?how to display image after reading bytes?
    i have tried coding tis , but i couldnt get the image to be display:
    BufferedInputStream in1=new BufferedInputStream(kkSocket.getInputStream());
    int length1;
    byte [] data=new byte[1048576];
    if((length1=in1.read(data))!=-1){
    System.out.println("???");
    }System.out.println("length "+length1);
    Integer inter=new Integer(length1);
    byte d=inter.byteValue();

    didn't I tell you about using javax.imageio.ImageIO.read(InputStream) in another thread?

  • How to display images in a Jtable cell-Urgent

    Hay all,
    Can anybody tell me that can we display images to JTable' cell,If yes the how do we do that(with some code snippet)? Its very urgent .Plz reply as soon as possible.

    Here is an example
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.table.*;
    class SimpleTableExample extends JFrame
         private     JPanel  topPanel;
         private     JTable  table;
         private     JScrollPane scrollPane;
         public SimpleTableExample()
              setTitle( "Table With Image" );
              setSize( 300, 200 );
              setBackground( Color.gray );
              topPanel = new JPanel();
              topPanel.setLayout( new BorderLayout() );
              getContentPane().add( topPanel );
              // Create columns names
              String columnNames[] = { "Col1", "Col2", "Col3" };
              // Create some data
              Object data[][] =
                   { (ImageIcon) new ImageIcon("User.Gif"), (String) "100", (String)"101" },
                   { (String)"102", (String)"103", (String)"104" },
                   { (String)"105", (String)"106", (String)"107" },
                   { (String)"108", (String)"109", (String)"110" },
              // Create a new table instance
    DefaultTableModel model = new DefaultTableModel(data, columnNames);
              JTable table = new JTable( model )
                   public Class getColumnClass(int column)
                        return getValueAt(0, column).getClass();
              };          // Add the table to a scrolling pane
              scrollPane = new JScrollPane( table );
              topPanel.add( scrollPane, BorderLayout.CENTER );
         public static void main( String args[] )
              SimpleTableExample mainFrame     = new SimpleTableExample();
              mainFrame.setVisible( true );
    }

  • How to display Image by using Array?

    Hi all, I know to how to display the image in MXML by using
    AS 3.0
    like this:
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    width="100" height="80" borderStyle="solid">
    <mx:Script>
    <![CDATA[
    [Embed(source="logo.gif")]
    [Bindable]
    public var imgCls:Class;
    ]]>
    </mx:Script>
    <mx:Image source="{imgCls}"/>
    <!--OR-->
    <mx:Image source="@Embed('assets/Nokia_6630.png')"/>
    </mx:Application>
    But the thing is I am building a list for display the images,
    the values is come from the Array. I am trying a different way for
    display it but no working, here is my code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml">
    <mx:Script>
    <![CDATA[
    public var PICTURE_ARRAY:Array = [{label:"FileA",
    icon:"@Embed('upload/myjpg.jpg')"},
    {label:"FileC", icon:"@Embed('upload/myjpg.jpg')"},
    {label:"FileB", icon:"@Embed('upload/myjpg.jpg')"}]
    ]]>
    </mx:Script>
    <mx:Tile id="pictureSelection" height="180" width="500"
    borderStyle="solid">
    <mx:Repeater id="picRP"
    dataProvider="{PICTURE_ARRAY}">
    <mx:VBox horizontalAlign="center" verticalAlign="middle"
    verticalGap="0" borderStyle="none" width="100" height="100">
    <mx:Image width="80" height="80"
    source="{picRP.currentItem.icon}"
    toolTip="{picRP.currentItem.icon}"/>
    <!--
    I also tryed this as well:
    set the icon value as picture location like: "A.jpg" or
    "B.jpg"
    then
    <mx:Image width="80" height="80"
    source="@Embed('upload/{picRP.currentItem.icon}')" />
    -->
    <mx:Label text="{picRP.currentItem.label}" width="100"
    textAlign="center"/>
    </mx:VBox>
    </mx:Repeater>
    </mx:Tile>
    </mx:Application>
    Can anyone tell how to display the array value into Image
    tag? Thanks

    In your data you have this:
    {label:"FileC", icon:"@Embed('upload/myjpg.jpg')"},
    change it to this:
    {label:"FileC", icon:"upload/myjpg.jpg"}, // this is just the
    filename, not embedded
    In your Repeater you have this Image tag:
    <mx:Image width="80" height="80"
    source="{picRP.currentItem.icon}"
    toolTip="{picRP.currentItem.icon}"/>
    which is fine, except for the toolTip. The toolTip uses a
    string, not an image. If you want to show an image in the toolTip,
    you'll need to write your own toolTip class.
    Now the source property of the image will be given the URL to
    the image which will then be requested from the server and
    downloaded at runtime - it is not embedded.
    If you need to embed the images, then your dataProvider
    should have the variable name associated with the embedded
    image.

  • How to display image using from open dialog box?

    I've developed a program that can display image by named the file that I want to display in my program.
    But how can I display an image from an Open Dialog Box?
    I attch here with my program.
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.filechooser.*;
    public class SuDisplayTool6 extends JFrame implements InternalFrameListener,ActionListener
    JTextArea display1;
    JDesktopPane desktop;
    JInternalFrame displayWindow;
    JInternalFrame listenedToWindow;
    static final String SHOW = "Show Image";
    static final int desktopWidth = 800;
    static final int desktopHeight = 600;
    private static final int kControlX = 88 ;
    private DrawingPanel panel;
    public SuDisplayTool6(String title)
    super("Internal Frame");
    desktop = new JDesktopPane();
    desktop.putClientProperty("JDesktopPane.dragMode","outline");
    desktop.setPreferredSize(new Dimension(desktopWidth, desktopHeight));
    setContentPane(desktop);
    addMenu();
    createDisplayWindow();
    desktop.add(displayWindow);
    Dimension displaySize = displayWindow.getSize();
    displayWindow.setSize(desktopWidth, displaySize.height);
    protected void createDisplayWindow()
    JButton b1 = new JButton("Show Image");
    b1.setActionCommand(SHOW);
    b1.addActionListener(this);
    display1 = new JTextArea(3,30);
    display1.setEditable(false);
    JScrollPane textScroller = new JScrollPane(display1);
    textScroller.setPreferredSize(new Dimension(200,75));
    textScroller.setMinimumSize(new Dimension(10,10));
    displayWindow = new JInternalFrame("Header Graph",true,false,true,true);
    JPanel contentPane = new JPanel();
    contentPane.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
    contentPane.setLayout(new BoxLayout(contentPane, BoxLayout.Y_AXIS));
    contentPane.add(Box.createRigidArea(new Dimension(0,5)));
    contentPane.add(textScroller);
    b1.setAlignmentX(CENTER_ALIGNMENT);
    contentPane.add(b1);
    displayWindow.setContentPane(contentPane);
    displayWindow.pack();
    displayWindow.show();
    protected void createListenedToWindow()
    listenedToWindow = new JInternalFrame("Image",true,true,true,true);
    listenedToWindow.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
    listenedToWindow.setSize(800,450);
    panel = new DrawingPanel();
    listenedToWindow.setContentPane(panel);
    public void internalFrameClosing(InternalFrameEvent e)
    public void internalFrameClosed(InternalFrameEvent e)
    listenedToWindow = null;
    public void internalFrameOpened(InternalFrameEvent e)
    public void internalFrameIconified(InternalFrameEvent e)
    public void internalFrameDeiconified(InternalFrameEvent e)
    public void internalFrameActivated(InternalFrameEvent e)
    public void internalFrameDeactivated(InternalFrameEvent e)
    public void actionPerformed(ActionEvent e)
    if (e.getActionCommand().equals(SHOW))
    if (listenedToWindow == null)
    createListenedToWindow();
    listenedToWindow.addInternalFrameListener(this);
    desktop.add(listenedToWindow);
    listenedToWindow.setLocation(desktopWidth/2 - listenedToWindow.getWidth()/2,
    desktopHeight - listenedToWindow.getHeight());
    listenedToWindow.show();
    else
    public static void main(String[] args)
    JFrame frame = new SuDisplayTool6("Su Display Tool");
    frame.addWindowListener(new WindowAdapter()
    public void windowClosing(WindowEvent e)
    System.exit(0);
    frame.pack();
    frame.setVisible(true);
    private void addMenu()
    JMenuBar menuBar;
    JMenu menu, submenu;
    JMenuItem menuItem;
    final JFileChooser fc = new JFileChooser();
    fc.addChoosableFileFilter(new ImageFilter());
    menuBar = new JMenuBar();
    setJMenuBar(menuBar);
    menu = new JMenu("File");
    menuBar.add(menu);
    menuItem = new JMenuItem("Open...");
    menu.add(menuItem).addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent e)
    int returnVal = fc.showOpenDialog(SuDisplayTool6.this);
    menuItem = new JMenuItem("Save");
    menu.add(menuItem);
    menuItem = new JMenuItem("Save As...");
    menu.add(menuItem).addActionListener(new ActionListener()
    public void actionPerformed(ActionEvent e)
    int returnVal = fc.showSaveDialog(SuDisplayTool6.this);
    menuItem = new JMenuItem("Close");
    menu.add(menuItem);
    menu.addSeparator();
    menuItem = new JMenuItem("Exit");
    menu.add(menuItem).addActionListener(new WindowHandler());
    menu = new JMenu("Edit");
    menuBar.add(menu);
    menu = new JMenu("View");
    menuBar.add(menu);
    menuItem = new JMenuItem("Zoom In");
    menu.add(menuItem);
    menuItem = new JMenuItem("Zoom Out");
    menu.add(menuItem);
    menu.addSeparator();
    submenu = new JMenu("Header");
    menuItem = new JMenuItem("CDPX");
    submenu.add(menuItem);
    menuItem = new JMenuItem("SX");
    submenu.add(menuItem);
    menuItem = new JMenuItem("CX");
    submenu.add(menuItem);
    menu.add(submenu);
    menu = new JMenu("Help");
    menuBar.add(menu);
    menuItem = new JMenuItem("About");
    menu.add(menuItem).addActionListener(new WindowHandler());
    private class WindowHandler extends WindowAdapter implements ActionListener
    public void windowClosing(WindowEvent e)
    System.exit(0);
    public void actionPerformed(ActionEvent e)
    if(e.getActionCommand().equalsIgnoreCase("exit"))
    System.exit(0);
    else if(e.getActionCommand().equalsIgnoreCase("About"))
    JOptionPane.showMessageDialog(null,"This program is written by Nenny Ruthfalydia.","About",JOptionPane.PLAIN_MESSAGE);
    class DrawingPanel extends Panel
    final ImageIcon imageIcon = new ImageIcon("image8.jpg");
    Image image = imageIcon.getImage();
    public void paint (Graphics g)
    g.drawImage(image, 10, 10, this);

    so much wrong with this post...
    a) use the code tags to format the code. Now it is an unreadable mess
    b) scriptlets in your JSP. I don't even want to look at that mess. Learn how to combine servlets and JSPs to create clean, readable and maintainable code in which view logic and business logic are separated. The rule: no java code in your JSP, only tags and EL expressions (learn about JSTL).
    So you get a blank screen. When you do "view source" in your browser, do you see anything there? If nothing, check if you are behind a proxy server. The solution to a post of not too long ago was that the blank screen was being caused by faulty proxy server settings (the user figured it out himself, I don't know what was done to solve it).
    If all this fails you will have to do some debugging magic using your favorite IDE. It will probably be something stupid you are overlooking in the code. It is annoying, but debugging code that does not work is a big part of your job. Better get good at it.

  • Display Images at WD ABAP application

    Hi,
    How to display the image which exist in KM ? I need to read the image from KM and display in WebDynpro ABAP  application. How to do it.  Do we have that provision here ? If not posible can we display some images keeping them in the application itself. ?
    Thanks
    Jyothi.

    Jyothi,
    you can store the images in MIME repository like this https://forums.sdn.sap.com/click.jspa?searchID=18727216&messageID=6430157
    Showing Image in Web Dynpro using ABAP
    Thanks
    Bala Duvvuri

  • How to display images in a page?

    Hello
    I would like to show a specific image in the main page of my application. The images to display will be in a table in the database. The idea is that when a user login into the application, the main page shows the image associated and some links.

    Hello,
    You can put an HTML region on your page and then use img tags to display it....How are your images in the database? are they image.gif? or?
    Since your images are in a table, you could do some sql...
    select '(img src="server:port/dir/dir/' || IMG || '" alt="image"/)'
    from table
    where
    Remember to replace the ( with < and ) with >
    Hope this helps out some.
    -Chris

  • How to display image on Portlet ?

    Dear all,
    I am now designing an application using Oracle Portal to maintain a company's employee records.
    The application allows HR personnels to input employee information such as name, gender, age and so on. In additional, a photo of 250x300 will be uploaded to database as well.
    The application allows hr personnels to query the database for employees and the photos will be displayed on web.
    I will use JDeveloper for the development. I want to know how to display the photos on the web in Portlet?
    thanks
    George (HK)

    Well at the end of the line its still plain old html that is used to display images, to display an image in html (correct me if im wrong) the image has to be in the webfolder (or it can be a servlet that generates an image)
    You are getting the image from a database, so you need a servlet that gets this image and converts it to a format the html tag < img src="..." > understands.
    To be honest I never done this, but Im curious how you will do it.
    You could also try to use AJAX and load the image dynamically, you'll still need a servlet though. You must also understand that a portlet differs a little bit from a servlet, portlet need a portal to run, servlet can run on its own.
    Hope this helps, I hope you also get some other answers, let me know if you succeed, im curious

Maybe you are looking for

  • Multiple address books on the same computer: How to

    Hi! I'll get in the near future my wife's iPhone 3G (unless she keeps it and take her 3GS instead) - but want want to be 100% sure we can have separate address books on the same computer. The question is simple: how do we go about that? Thanks in adv

  • The next firmware for N97

    Nokia, I know you guys read this blog about the biggest disappointment in the History of Nokia (the N97). I want an exact release date of the next firmware and exact list of what is being done.. I cannot stand this RAM and C drive issues on this devi

  • Facebook in safari

    why all of a sudden wont facebook load in safari when everything else will? it wont even load from my history.

  • Joining Multiple Line Segments

    Is there a way to join any number of line segments into one continuous line? The end points overlap, but selecting all and going to Object>Path>Join seems to have no effect. Making a compound path helps, but doesn't allow me to smooth the final path.

  • Oracle Hot Backup Script Windows Server 2003

    Hello, Does anyone here have a working Oracle 10I database hot backup script for Windows Server 2003? If so can you please post it here. Thanks.