Problem displaying Student Images

Hello Experts,
We developing a Webdynpro for ABAP application as part of Student Portal. We are using the below FM
ARCHIVOBJECT_GET_URI to retrieve the Image URI which looks like the one below.
http://saptrng.chennai.upes.ac.in:8000/sap/bc/contentserver/755?get&pVersion=0046&contRep=MA&docId=8DE1CB2CCA3D3347A9DD77AAC08FD6FD
I have mapped the URI to the IMAGE UI element. The image is getting displayed If I execute the above URL in the browser. But not
in WDA application.
Can you please give your inputs to over come my problem.
Thanks & Regards,
Murthy

Hi,
Follow this forum discussion (scroll to the end of the thread ).
[Forum thread|Photo from Pa30 into Adobe Forms.;

Similar Messages

  • Problem Displaying an Image in a JScrollPane

    Hi All,
    I've placed a Toolbar at the bottom of a JFrame and above the toolbar I placed a JTabbedPane. In one of the tabs I want to display a full sized image.The size of the image that I want to display using a scroll pane is 595x842 pixels. Now the problem is that when I display the image in the scroll pane the bottom toolbar is overlapped with the scrollpane. I don't want to resize the image as it is spoiling the image quality.I used the below code
    JPanel imagepagepanel=new JPanel()
        protected void paintComponent(Graphics g)
              js=new JScrollPane();
              Point p = js.getViewport().getViewPosition();
              g.drawImage(demoicon.getImage(), p.x, p.y, null);
    mytabbedpane.addTab("View Image",js); //add the scrollpane to the tabI even tried using a label to display the image in the tabbedpane and I've got the same overlapping problem.
    I am able to embed the default browser in my application using JDIC API and the image display is fine in the browser without overlapping the bottom toolbar. But I don't want to use a web browser to display the image.
    It would be of great help if anyone could suggest a solution to the overlapping problem. I want the scroll pane to work similar to a web browser while displaying a large sized image.
    Thanks in advance.

    Override the paintComponent method to just draw the
    image at 0, 0, w, h.
    The rest is not needed, to say the least.Here's an easier way
    import javax.imageio.ImageIO;
    import javax.swing.*;
    import java.awt.*;
    import java.io.File;
    import java.io.IOException;
    public class ImageInTabbedScrollTest extends JFrame {
        public ImageInTabbedScrollTest() {
            buildGUI();
        private void buildGUI() {
            JPanel mainPanel = (JPanel) getContentPane();
            mainPanel.setLayout(new BorderLayout());
            JTabbedPane tabbedPane = new JTabbedPane();
            try {
                Image image = ImageIO.read(new File("images/terrain.jpg"));
                ImageIcon icon = new ImageIcon(image);
                JLabel label = new JLabel(icon);
                JPanel panel = new JPanel(new GridLayout(0,1,5,5));
                panel.add(label);
                JScrollPane jsp = new JScrollPane(panel);
                tabbedPane.addTab("Image",jsp);
                JPanel anotherPanel = new JPanel();
                JLabel label2 = new JLabel("Second Panel");
                anotherPanel.add(label2);
                 label2.setFont(new Font("San Serif",Font.BOLD, 40));
                tabbedPane.add("Label",anotherPanel);
                mainPanel.add(tabbedPane, BorderLayout.CENTER);
                JToolBar tBar = new JToolBar();
                tBar.add(new Button("OK"));
                tBar.add(new Button("Maybe"));
                tBar.add(new Button("No"));
                mainPanel.add(tBar, BorderLayout.SOUTH);
                  } catch (IOException e) {
                e.printStackTrace();
        public static void main(String[] args) {
            Runnable runnable = new Runnable() {
                public void run() {
                    ImageInTabbedScrollTest testFrame = new ImageInTabbedScrollTest();
                    testFrame.setSize(new Dimension(600,600));
                    testFrame.setLocationRelativeTo(null);
                    testFrame.setDefaultCloseOperation(EXIT_ON_CLOSE);
                    testFrame.setVisible(true);
            SwingUtilities.invokeLater(runnable);
    }

  • Problems displaying an image on Adobe Reader 8.1.2

    Hi guys,
    We are trying to display a JPG image in an InteractiveForm. So, we set an Image (StaticImage) to be loaded using the following Formcalc script on Page Initialize event:
    StaticImage1.value.image.href = $record.ImageURL
    On our last project, we could display a JPG image with Adobe Reader 6 (with some alert messages), 7 and 8 (7 and 8 fully functional). But in this one, the same solution doesn't work. The unique difference between both solutions is the URL format. Last project displays an image based on a normal URL ("http://app.client.com/photo/1234.jpg"), and in the current project we create a PNG or JPG image based on a JFreeChart, generating an URL to access it ("http://server1:54321/webdynpro/resources/vendor.com/..(long)../graph43211234.jpg").
    When we load it using a computer with Adobe Reader 7.0.x installed, the bellow message is displayed requesting an action:
    "Acrobat is attempting to connect to the site:
    http://server1:54321/webdynpro/resources/vendor.com/..(long)../graph43211234.jpg
    If you trust the site click "Allow", otherwise click "Block".
    Possible actions: Block, Allow and a check "Remember my action for the site: server1"
    Allowing the connection, the images are displayed. But, in a machine with Adobe Reader 8.1.2 installed, sometimes it asks for permission to access the URL, sometimes not. And, in both cases, in this version it doesn't display the images...
    Can anyone shed any light on this? Also, is there a way to block this annoying message?
    Regards,
    Douglas Frankenberger
    P.S.:
    1 - The Image is not marked as Embedded. This option don't seems to make any difference, as on our last project the StaticImage was not flaged as Embed, but the JPG file was embeded in the PDF anyway...
    2 - Interactive Form display type: native. Mode: updateDataInPDF
    3 - In current project, when we set the same image the we had set on the old project, it loads successfully. Also, the generated JFreeChart image is fully accessible when displayed directly in IE using its URL.
    4 - Versions:
      - Client: Windows XP Professional
      - NWDS 7.0.10
      - Adobe Livecycle 7.0.50519.0
      - Adobe Reader: 7.0.8, 7.0.9 and 8.1.2

    Hi Amita.
    We already tried it (checked / unchecked), but it seems to make no difference. There is a strange behavion on this:
    - When I set it checked, on a computer disconnected from the web and running Adobe Reader 7.0.9, it asks for permission to access a resource (as I said before). In this case, even disconnected, it shows up my image independent of allowing/blocking the access to the external resource. In other words, it is embedded (I think...), but continues asking for access anyway.
    - The same scenery above, but using Adobe Reader 8.1.2 instead of 7.0.9.... sometimes it asks for permission, sometimes not. But in both cases, it doesn't display the images...
    Regards,
    Douglas Frankenberger

  • Problem displaying the image

    I am having a trouble with display an image. My image is put in the base directory of my workspace and my IDE is Eclipse. However, I just can't get the image to display...
    It is at the bottom of the code...
    package ca.carleton.comp3004.client.ui;
    import java.awt.BorderLayout;
    import java.awt.Graphics;
    import java.awt.Image;
    import java.awt.event.ActionEvent;
    import javax.imageio.*;
    import javax.swing.AbstractAction;
    import javax.swing.Action;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTextArea;
    import javax.swing.JTextField;
    import javax.swing.border.TitledBorder;
    import javax.swing.*;
    import java.awt.*;
    import javax.swing.event.*;
    import java.awt.event.*;
    import java.io.File;
    import java.io.IOException;
    import ca.carleton.comp3004.client.model.Model;
    import ca.carleton.comp3004.util.AppUtils;
    import ca.carleton.comp3004.util.UiUtils;
    public class GamePanel extends JPanel
         private JPanel bottomStuff;
         private JScrollPane cardPane;
         private JButton requestCards;
         private JPanel centerStuff;
         private JPanel[] playerStuff;
         private JLabel[] playerName;
         private JLabel[] playerNumCards;
         private JLabel[] playerScore;
         private JPanel topStuff;
         private JLabel unoCode;
         private JLabel timeLabel;
         private JButton leave;
         private Image board = null;
         //Icon BoardImage = new ImageIcon("C:\Users\tzaid\Desktop\steve stuff\Johnny_Workspace\GameBoard.png");
         //private ActionListener buttonlistener;
         private Model model;
         private class CardRequestListener implements ActionListener {
            public void actionPerformed(ActionEvent theEvent) {
                  AppUtils.invoke(new Runnable()
                     public void run()
                          model.requestCards();
         private class CardButtontListener implements ActionListener {
            public void actionPerformed(ActionEvent theEvent) {
                 final int cardIndex = Integer.parseInt(theEvent.getActionCommand());
                 AppUtils.invoke(new Runnable()
                    public void run()
                         model.playCard(cardIndex); //****note: extract cardNum
         private class LeaveListener implements ActionListener {
            public void actionPerformed(ActionEvent theEvent) {
                 AppUtils.invoke(new Runnable()
                    public void run()
                         model.leave(); //****note: not in protocol yet
         // actions
         CardRequestListener myCardRequestListener = new CardRequestListener();
         CardButtontListener myCardButtonListener = new CardButtontListener();
         LeaveListener myLeaveListener = new LeaveListener();
        public GamePanel(Model model)
             this.model = model;
             createComponents(this);
         * Creates the components.
        private void createComponents(JPanel container)
             container.setLayout(new BorderLayout());
            // chat panel
            CreatePanels();
            container.add(centerStuff, BorderLayout.CENTER);
            container.add(bottomStuff, BorderLayout.SOUTH);
            container.add(topStuff, BorderLayout.NORTH);
          //  Graphics g = new Graphics();
          //  g.drawImage(board, 0, 0, null);
         * Creates the chat panel for chat room functionality.
         * @return A panel containing chat room controls.
         * @see JPanel
        private void CreatePanels()
             topStuff = new JPanel();
             unoCode = new JLabel("UNO Code: ");
             timeLabel = new JLabel("Time: ");
             leave = new JButton("Leave Game");
             leave.addActionListener(myLeaveListener);
             topStuff.setLayout(new BorderLayout());
             topStuff.add(unoCode, BorderLayout.WEST);
             topStuff.add(timeLabel, BorderLayout.EAST);
             topStuff.add(leave, BorderLayout.NORTH);
             topStuff.setBorder(BorderFactory.createLineBorder(Color.black));
             //******note: need to specify size*****
             int size = 5;
             centerStuff = new JPanel();
             playerStuff = new JPanel[size];
             playerName = new JLabel[size];
             playerNumCards = new JLabel[size];
             playerScore = new JLabel[size];
             centerStuff.setLayout(new FlowLayout(FlowLayout.CENTER, 40, 40));  //need to change later so is around table
             for(int i = 0; i<size; i++){
                  playerStuff[i] = new JPanel();
                  playerStuff.setLayout(new BorderLayout());
              playerName[i] = new JLabel("no name" ); //****get player name here
              playerNumCards[i] = new JLabel("0");
              playerScore[i] = new JLabel("0");
              playerStuff[i].add(playerName[i], BorderLayout.NORTH);
              playerStuff[i].add(playerNumCards[i], BorderLayout.CENTER);
              playerStuff[i].add(playerScore[i], BorderLayout.SOUTH);
              playerStuff[i].setBorder(BorderFactory.createLineBorder(Color.black));
              centerStuff.add(playerStuff[i]);
         bottomStuff = new JPanel();
         cardPane = new JScrollPane();
         requestCards = new JButton("Request Cards");
         requestCards.addActionListener(myCardRequestListener);
         bottomStuff.setLayout(new BorderLayout());
         bottomStuff.add(requestCards, BorderLayout.WEST);
         bottomStuff.add(cardPane, BorderLayout.CENTER);
         bottomStuff.setBorder(BorderFactory.createLineBorder(Color.black));
    public GamePanel()
         setPreferredSize(new Dimension(790,572));
         setMaximumSize(getPreferredSize());
         setMinimumSize(getPreferredSize());
         setSize(getPreferredSize());
         try
    board= ImageIO.read(new File("GameBoard.png"));
    getGraphics().drawImage(board, 0, 0, null);
         catch (IOException e)
         e.printStackTrace();
    /* private JPanel createMessageListPanel()
    JPanel messageListPanel = new JPanel(new BorderLayout());
    JScrollPane scrollPane = new JScrollPane(messageList = createMessageList(),
    JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
    JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
    scrollPane.setAutoscrolls(true);
    messageListPanel.add(scrollPane);
    messageListPanel.setBorder(new TitledBorder("Messages"));
    return messageListPanel;
    * Creates message list.
    * @return A text area to store messages in.

    Look like a bad video card. Are you eligible for Apple's Repair extension programs?

  • Problems Displaying an Image in a TableCell

    I read a few tutorials online about adding images to a tableview tablecell and tried to implement what I learned from the tutorial, but I'm not having much luck. My problem is that the image is not being displayed in the table cell.
    The problem is in the getTable Method of the ExampleProblem class. I know that "item" in the updateItem method of the setCellFactory is null and I can figure out why. I'm having a hard time understanding the callback part of the setCellFactory, which is making it difficult to figure out where my problem is located and why it is happening.
    Hopefully, someone can help me out or at least point me in the right direction.
    Thanks in advance for any help.
    -Fred
    package whitman.fa.encounter;
    import javafx.application.Application;
    import javafx.beans.property.IntegerProperty;
    import javafx.beans.property.ObjectProperty;
    import javafx.beans.property.SimpleIntegerProperty;
    import javafx.beans.property.SimpleObjectProperty;
    import javafx.beans.property.SimpleStringProperty;
    import javafx.beans.property.StringProperty;
    import javafx.collections.FXCollections;
    import javafx.collections.ObservableList;
    import javafx.geometry.Pos;
    import javafx.scene.Group;
    import javafx.scene.Scene;
    import javafx.scene.control.TableCell;
    import javafx.scene.control.TableColumn;
    import javafx.scene.control.TableView;
    import javafx.scene.control.cell.PropertyValueFactory;
    import javafx.scene.effect.DropShadow;
    import javafx.scene.image.Image;
    import javafx.scene.image.ImageView;
    import javafx.scene.layout.BorderPane;
    import javafx.scene.layout.GridPane;
    import javafx.scene.layout.VBox;
    import javafx.scene.paint.Color;
    import javafx.scene.shape.Rectangle;
    import javafx.scene.text.Font;
    import javafx.scene.text.Text;
    import javafx.stage.Stage;
    import javafx.util.Callback;
    public class ExampleProblem extends Application
      BorderPane rootLayout;
      ObservableList<Encounter> encounters = FXCollections.observableArrayList();
      ObservableList<MobPict> imgData = FXCollections.observableArrayList();
      Group root;
      Scene scene;
      GridPane pane;
      public ExampleProblem()
      imgData.addAll(new MobPict("Bugbear.jpg","Bugbear"), new MobPict("po_BGArcher_h.png", "PC"));
      encounters.addAll(
      new Encounter(1,5,1,1,"Bugbear",0,0,null,3,"Bestiary pg 75", imgData.get(0)),
      new Encounter(6,15,1,1,"PC",0,0,null,3,"HeroLabs",imgData.get(1))
      @Override
      public void start(Stage primaryStage) throws Exception
      primaryStage.setTitle("Table Test with image column");
      //Display TableView
      Group group = getBackground();
      VBox box = new VBox();
      box.setLayoutX(20);
      box.setLayoutY(5);
      box.setSpacing(15);
      Text text = new Text("Image Column test");
      text.setFont(new Font(20));
      TableView<Encounter> table = getTable();
      box.getChildren().addAll(text, table);
      group.getChildren().add(box);
      Scene scene = new Scene(group, 680,530,Color.web("#666666"));
      primaryStage.setScene(scene);
      primaryStage.show();
      public Group getBackground()
      Group group = new Group();
      group.setLayoutX(40);
      group.setLayoutY(40);
      Rectangle rect = new Rectangle();
      rect.setWidth(600);
      rect.setHeight(460);
      rect.setFill(Color.web("#f5f5f5"));
      DropShadow dropShadow = new DropShadow();
      dropShadow.setRadius(50);
      dropShadow.setOffsetX(0);
      dropShadow.setOffsetY(0);
      dropShadow.setColor(Color.web("#969696"));
      rect.setEffect(dropShadow);
      group.getChildren().add(rect);
      return group;
      @SuppressWarnings("unchecked")
      public TableView<Encounter> getTable()
      TableView<Encounter> imageTable = new TableView<Encounter>();
      TableColumn<Encounter, Number> minChanceCol = new TableColumn<Encounter, Number>("Min Chance");
      minChanceCol.setCellValueFactory(new PropertyValueFactory<Encounter, Number>("minChance"));
      TableColumn<Encounter, Number> maxChanceCol = new TableColumn<Encounter, Number>("Max Chance");
      maxChanceCol.setCellValueFactory(new PropertyValueFactory<Encounter, Number>("maxChance"));
      TableColumn<Encounter, MobPict> imgCol = new TableColumn<Encounter, MobPict>("Images");
      imgCol.setCellValueFactory(new PropertyValueFactory<Encounter, MobPict>("mobPicPath"));
      imgCol.setCellFactory(new Callback<TableColumn<Encounter,MobPict>,TableCell<Encounter,MobPict>>()
      @Override
      public TableCell<Encounter, MobPict> call(TableColumn<Encounter, MobPict> param)
      TableCell<Encounter, MobPict> cell = new TableCell<Encounter, MobPict>()
      @Override
      public void updateItem(MobPict item, boolean empty)
      //System.out.println("update Item called");
      //System.out.println(item.getMobName());
      if(item != null)
      VBox box;
      ImageView imgView;
      box= new VBox();
      box.setAlignment(Pos.CENTER);
      imgView = new ImageView();
      imgView.setFitHeight(100);
      imgView.setFitWidth(100);
      imgView.setImage(new Image(TestApp.class.getResource("img").toString()+"/"+item.getMobPicPath()));
      box.getChildren().add(imgView);
      setGraphic(box);
      return cell;
      imageTable.getColumns().addAll(minChanceCol,maxChanceCol, imgCol);
      imageTable.setItems(encounters);
      return imageTable;

    First paste in Number/Date format like:
    DOWNLOAD::::::
    and Apply Change
    after this you will see link BLOB Download Format Mask

  • Problems displaying jpeg images on website.

    I am trialing a website at Clikpic for photographers. The images I have uploaded so far display fine in IE9 but not in Firefox. Spoke to support at Clikpic and they confirm they can see my images fine in Firefox. Cleared all the history, cache, cookies etc but still no good. Downgraded to 3.6.17 just incase, but still no luck. Would appreciate any advice you could give. It must be something local to my laptop I'm thinking? Really don't want to have to use IE.

    If images are missing then check that you aren't blocking images from some domains.
    See:
    * http://kb.mozillazine.org/Images_or_animations_do_not_load
    * Check the permissions for the domain in the current tab in Tools > Page Info > Permissions
    * Check the exceptions in Tools > Options > Content: Load Images > Exceptions
    * Check the "Tools > Page Info > Media" tab for blocked images (scroll through all the images)
    There are also extensions (Tools > Add-ons > Extensions) that can block images.
    * [[Troubleshooting extensions and themes]]
    You can use these steps to check if images are blocked:
    * Open the web page that has the images missing in a browser tab.
    * Click the website favicon ([[Site Identity Button]]) on the left end of the location bar.
    * Click the "More Information" button to open the "Page Info" window with the Security tab selected (also accessible via "Tools > Page Info").
    * Go to the <i>Media</i> tab of the "Tools > Page Info" window.
    * Select the first image link and scroll down through the list with the Down arrow key.
    * If an image in the list is grayed and there is a check-mark in the box "<i>Block Images from...</i>" then remove that mark to unblock the images from that domain.

  • Safari 3.0.3 doesnt display flash images

    Ever since i updated Safari to 3.0.2 and then 3.0.3, i have had problem displaying flash images such as the Yahoo logo at the top of the Yahoo page and Youtube videos.
    anyone of a solution to this or why it is happening?

    How to view/hear pretty much everything:
    Assuming you already run OS 10.4.9 or above and have Quicktime 7.2, and are using Safari 2 or 3, download and install (or re-install even if you already had them) the latest versions, suitable for your flavor of Mac, of:
    RealPlayer from http://uk.real.com/player/
    Flip4Mac WMV Player from http://www.microsoft.com/windows/windowsmedia/player/wmcomponents.mspx
    Perian from http://perian.org/
    Adobe FlashPlayer from http://www.adobe.com/shockwave/download/download.cgi?P1ProdVersion=ShockwaveFlash
    In Quicktime Preferences, under advanced, UNcheck Enable Flash, and under Mime settings/Miscellananeous only check Quicktime HTML (QHTM).
    In Macintosh HD/Library/Quicktime/ delete any files relating to DivX (Perian already has them).
    The world should now be your oyster!
    You should also have the free VLC Player from http://www.videolan.org/ in your armory, as this plays almost anything that DVD Player might not.

  • Problem with displaying BLOB images on JSP page using a servlet

    hi. I have a big problem with displaying BLOB images using JSP. I have a servlet that connects to the oracle database, gets a BLOB image , reads it, and then displays it using a BinaryStream. The problem is , this works only when i directly call that servlet, that is http://localhost:8080/ImageServlet. It doesn't work when i try to use that servlet to display my image on my JSP page (my JSP page displays only a broken-image icon ) I tried several coding approaches with my servlet (used both Blob and BLOB objects), and they work just fine as long as i display images explicitly using only the servlet.
    Here's what i use : ORACLE 10g XE , Eclipse 3.1.2, Tomcat 5.5.16 , JDK 1.5
    here is one of my image servlet's working versions (the essential part of it) :
                   BLOB blob=null;
              rset=st.executeQuery("SELECT * FROM IMAGES WHERE ID=1");
              while (rset.next())
                   blob=((OracleResultSet)rset).getBLOB(2);
              response.reset();
              response.setContentType("image/jpeg");
              response.addHeader("Content-Disposition","filename=42.jpeg");
                    ServletOutputStream ostr=response.getOutputStream();
                   InputStream istr=blob.getBinaryStream(1L);
                    int size=blob.getBufferSize();
              int len=-1;
                    byte[] buff = new byte[size];
                         while ((len=istr.read( buff ))!=-1 ) {
                   ostr.write(buff,0,len);
             response.flushBuffer();
             ostr.close(); and my JSP page code :
    <img src="/ImageServlet" border="0"  > If you could just tell me what i'm doing wrong here , or if you could show me your own solutions to that problem , i would be very greatful ,cos i'm realy stuck here , and i'm rather pressed for time too. Hope someone can help.

    I turns out that it wasn't that big of a problem after all. All i had to do was to take the above code and place it into another JSP page instead of into a servlet like i did before. Then i just used that page as a source for my IMG tag in my first JSP. It works perfectly well. Why this doesn't work for servlets i still don't know, but it's not a problem form me anymore . Ofcourse if someone knows the answer , go ahead and write. I would still appriceatte it.
    here's the magic tag : <img src="ImageJSP.jsp" border="0"  > enjoy : )

  • Problem with display an image on JFrame in Java 6

    I'm trying to display an image on JFrame in this way:
    1.) I'm creating a variable in the class:
        private Image imgSpeaker = null;2.) I'm overiting the paint method:
    public void paint(Graphics g) {
            super.paint(g);   
            g.drawImage(imgSpeaker, 330, 230, null);  
        }3.) In the constructor I'm using this code:
       imgSpeaker = Toolkit.getDefaultToolkit().getImage("D:\\speaker.gif");
            MediaTracker trop = new MediaTracker(this);
            trop.addImage(imgSpeaker,0);
            try {
                trop.waitForID(0);    // waiting untill downloading progress will be complite
            } catch (Exception e) {
                System.err.println(e);
            }        The Image will be displayed on form, but if I catch the window and move it (for example: down as possible)
    the image is not refreshed (repainted). What I'm doing wrong? I've been used this solution in Java 5 and everything
    works perfectly. Any of described methods aren't depricated... Anyone can help me?

    Thanks for your code, I've been tryed to apply your solution (with create a Buffered Image), but it still not working correctly. Firstly, the image isn't loading, and secondly the basic problem is not give in. Why have you been using "bg2d.draw(img, x, y, w, h, frame);" not in the paint method?
    I'm use "Free Design" layout. Below I put on completly code from Netbeans.
    import java.awt.Graphics;
    import java.awt.Image;
    import java.awt.MediaTracker;
    import java.awt.image.BufferedImage;
    public class ImageTest extends javax.swing.JFrame {
        private Image imgSpeaker = null;
        private BufferedImage bi = null;
        private MediaTracker trop = null;
        public ImageTest() { 
                initComponents();
                trop = new java.awt.MediaTracker(this);
                imgSpeaker = java.awt.Toolkit.getDefaultToolkit().getImage("D:\\speaker.gif");
                try {
                    trop.addImage(imgSpeaker, 0);
                    trop.waitForID(0);
                } catch (java.lang.Exception e) {
                    java.lang.System.err.println(e);
                bi = new java.awt.image.BufferedImage(100, 100, java.awt.image.BufferedImage.TYPE_INT_RGB);
                java.awt.Graphics2D bg2d = (java.awt.Graphics2D) bi.createGraphics();
                trop.addImage(bi, 1);
    //            java.io.File f = new java.io.File("D:\\speaker.gif");
    //            try {
    //                bi = javax.imageio.ImageIO.read(f);
    //            } catch (IOException e) {
    //               java.lang.System.err.println(e);
        public void paint(Graphics g) {
    //      super.paint(g);
           try {                                                   
                trop.waitForAll();                                 
            } catch (Exception e) {
                System.err.println(e);
            g.drawImage(bi, 50, 100, imgSpeaker.getHeight(this), imgSpeaker.getHeight(this), this);
        // <editor-fold defaultstate="collapsed" desc=" Generated Code ">
        private void initComponents() {
            jButton1 = new javax.swing.JButton();
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            jButton1.setText("jButton1");
            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                    .addContainerGap(283, Short.MAX_VALUE)
                    .addComponent(jButton1)
                    .addGap(44, 44, 44))
            layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                    .addContainerGap(252, Short.MAX_VALUE)
                    .addComponent(jButton1)
                    .addGap(25, 25, 25))
            pack();
        }// </editor-fold>
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new ImageTest().setVisible(true);
        private javax.swing.JButton jButton1;
    }

  • Problem displaying image in jpanel

    Hi,I have posted this on the applet board, but I think its also a general programming problem, so apologies if it isn't relevant to this board, just say so and I'll remove it!
    I've got an applet that receives a variable from a PHP page as a parameter. The variable is "map1.png" the map this variable refers to sits in the same folder as the applet.
    I want to use this variable along with getDocumentBase() to create a URL which will then be used to display an image within a jPanel called mapPane.
    the code I currently have is:
    // get image url
    String mapURL = getParameter("mapURL");
    //set variable for image
    Image map_png;
    // set media tracker
    MediaTracker mt;
    //initialise media tracker     
    mt = new MediaTracker(this);
    map_png = getImage(getDocumentBase(),mapURL);
    // tell the MediaTracker to kep an eye on this image, and give it ID 1;
    mt.addImage(map_png,1);
    // now tell the mediaTracker to stop the applet execution
    // until the images are fully loaded.
    try
    mt.waitForAll();
    catch (InterruptedException e) {}
    // draw image onto mapPane
    mapPane.getGraphics().drawImage(map_png, 200, 200, null);
    Currently the Parameter is being passed into the applet (i've written it out within the applet) but the image is not being displayed. Does anyone have any suggestions about what I'm doing wrong?
    Cheers
    Steve

    hi,
    No, don't get any exceptions, the Java Console has a message:
    <terminated>JavaImageEditor[Java Applet]C:\Program Files\Java\jre1.6.0\bin\javaw.exe
    Cheers
    Steve

  • Problem displaying binary tif image from rfc

    Hello All,
    I am trying to display an image that is returned from RFC as binary image
    <b><u>Context description:</u></b>
    Context Node From RFC -  Out_Et_Image node type tbl1024
    Node element Line
    As I understand the node is representing a byte array and each Line element i a part of the array .
    <b><u><i>i did</i></u></b>
    <b>1. merge it into one byte array :</b>
    int ArrayTot = 0 ;
    for ( i =0;i<wdContext.nodeOut_Et_Image().size();i++){
         ArrayTot = ArrayTot+wdContext.nodeOut_Et_Image().getOut_Et_ImageElementAt(i).getLine().length     ;
         final byte[] pictureContentTemp1 = new byte[ArrayTot];
         for ( i =0;i<wdContext.nodeOut_Et_Image().size();i++){
              if(i>0){
                   j=j+wdContext.nodeOut_Et_Image().getOut_Et_ImageElementAt(i-1).getLine().length;
                   System.arraycopy(wdContext.nodeOut_Et_Image().getOut_Et_ImageElementAt(i).getLine(),0,
                        pictureContentTemp1,0,wdContext.nodeOut_Et_Image().getOut_Et_ImageElementAt(i).getLine().length     );
              }else{
                   j=wdContext.nodeOut_Et_Image().getOut_Et_ImageElementAt(i).getLine().length;
                   System.arraycopy(wdContext.nodeOut_Et_Image().getOut_Et_ImageElementAt(i).getLine(),0,
                                       pictureContentTemp1,j,wdContext.nodeOut_Et_Image().getOut_Et_ImageElementAt(i).getLine().length     );
    <u><b>2. using the IWDCachedWebResource to generate and display it</b></u>
    IWDCachedWebResource resource = WDWebResource.getWebResource
    (pictureContentTemp1,
    WDWebResourceType.GIF_IMAGE);
    resource.setResourceName("pic");
    try{
    IWDWindow window = wdComponentAPI.getWindowManager().
    createExternalWindow(resource.getURL(), "gggg", true);
    // Eliminate some features of the window
    window.removeWindowFeature(WDWindowFeature.ADDRESS_BAR);
    window.removeWindowFeature(WDWindowFeature.MENU_BAR);
    window.removeWindowFeature(WDWindowFeature.STATUS_BAR);
    window.removeWindowFeature(WDWindowFeature.TOOL_BAR);
    window.setWindowSize(780,430);
    window.setWindowPosition(20,140);
    window.open();
    }catch (Exception e){
         wdComponentAPI.getMessageManager().reportException(e.getLocalizedMessage(),false);
    The problem is that I get a corrupted file and i cant see or open it .
    Some more details:
    The original image size is 42,234 bytes
    i get from the RFC after merging the array 43,008 bytes i think that the extra bytes that a get are the problem , but i don't have any idea how to get rid of them or solve the problem .
    My WAS version is nw04 sp19
    Does any one encounter this problem? Or can guide me what to do?
    Thanks
    Ronen

    Try this VI (It's from "Image Acquisition and Processing with LabVIEW" - see for more details...
    cheers,
    Christopher
    Christopher G. Relf
    Certified LabVIEW Developer
    [email protected]
    International Voicemail & Fax: +61 2 8080 8132
    Australian Voicemail & Fax: (02) 8080 8132
    EULA
    1) This is a private email, and although the views expressed within it may not be purely my own, unless specifically referenced I do not suggest they are necessarily associated with anyone else including, but not limited to, my employer(s).
    2) This email has NOT been scanned for virii - attached file(s), if any, are provided as is. By copying, detaching and/or opening attached file
    s, you agree to indemnify the sender of such responsibility.
    3) Because e-mail can be altered electronically, the integrity of this communication cannot be guaranteed.
    >
    Copyright © 2004-2015 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 2.5 License.
    Attachments:
    Image_Browser-Selector_Example.llb ‏107 KB

  • Problems displaying image in JPanel

    Hi, I've got an applet that receives a variable from a PHP page as a parameter. The variable is "map1.png" the map this variable refers to sits in the same folder as the applet.
    I want to use this variable along with getDocumentBase() to create a URL which will then be used to display an image within a jPanel called mapPane.
    the code I currently have is:
    // get image url
            String mapURL = getParameter("mapURL");
            //set variable for image
            Image map_png;
            // set media tracker
            MediaTracker mt;
            //initialise media tracker             
            mt = new MediaTracker(this);
            map_png = getImage(getDocumentBase(),mapURL);
            // tell the MediaTracker to kep an eye on this image, and give it ID 1;
            mt.addImage(map_png,1);
            // now tell the mediaTracker to stop the applet execution
            //  until the images are fully loaded.
            try
                 mt.waitForAll();
            catch (InterruptedException  e) {}
            // draw image onto mapPane
            mapPane.getGraphics().drawImage(map_png, 200, 200, null);Currently the Parameter is being passed into the applet (i've written it out within the applet) but the image is not being displayed. Does anyone have any suggestions about what I'm doing wrong?
    Cheers
    Steve

    Hello,
    after an update of the graphics card driver to the newest just released version the problem has vanished.
    Regards

  • Image is NULL exception, problems displaying a png file

    Hi people,
    I want to display a simple image using j2me on my siemens sl45i emu.
    I'm using the following code to load my png 8x8(created with photoshop, 2bpp) image:
    public void load()
    try
    testImage = Image.createImage("res/enemy1.png");
    catch (Exception e)
    System.err.print("Ladefehler: " + e);
    when I want to display the image using the follwing code:
    private void render(Graphics g)
    g.drawImage(testImage,0,0,0);
    g.drawString("**** you!", 0, 0, Graphics.TOP|Graphics.LEFT);
    I'm getting the following exception:
    java.lang.NullPointerException: Image is null.
    Why do I get this exception when I want to display the image and not when I'm loading the image(something like "couldn't load image..." )....
    I've placed enemy1.png in a folder called "res" in my jar file. Displaying text does work so I don't understand why I can't display an image...
    Any help would be great!
    Thanx in advance, alex

    This can't be possible!
    private void load()
         GameGraphics.getInstance().load();
         Player.getInstance().load();
    I'm printing debug messages in both load()-methods and I'm getting an exception in the player class because gamegraphics didn't finish loading (I can see it from the debugging messages)

  • Problems displaying images stored in SQL Server as Datatype "image"

    I am trying to display an Image stored in SQL Server as
    datatype
    'image' and it only shows a portion of the image.
    It seems to be tied to the size (kb) of the image since the
    larger the
    image the less of it is shown before it cuts off(sometimes it
    cuts off
    mid line so it's about the file size and not fitting the
    image on the
    screen).
    Here is the code I am using that deals with the image.
    [Bindable]
    public var theImage:ByteArray = new ByteArray;
    private function getScans_result(event:ResultEvent):void{
    var imageByteArray:ByteArray = event.result[0].Image;
    theImage = imageByteArray
    <mx:Image id="theIMG" width="160" height="220"
    source="{theImage}"/>
    Any Thoughts??

    I do that sort of thing using PHP and mySQL the binary part
    of the image is stored in a BLOB field (Binary Large OBject) along
    the rest of the information necessary for the http headers (e.g.
    mime type, file name, file size) being staored in their own fields.
    That info is then used to build the file using PHP. The PHP
    file contains a mySQL query whos result is echoed with the
    appropriate headers. The URL points at the PHP file rather than at
    any saved image.
    Here's the php:
    <?
    # display_imagebank_file.php
    # Note: the ID is passed through the url e.g.
    # this_files_name.php?id=1
    # connect to mysql database
    mysql_connect('HOST', 'USERNAME', 'PASSWORD');
    mysql_select_db('DATABASE');
    # run a query to get the file information
    $query = mysql_query("SELECT FileName, MimeType, FileSize,
    FileContents FROM blobTable WHERE ID='$id'");
    # perform an error check
    if(mysql_num_rows($query)==1){
    $fileName = mysql_result($query,0,0);
    $fileType = mysql_result($query,0,1);
    $fileSize = mysql_result($query,0,2);
    $fileContents = mysql_result($query,0,3);
    header("Content-type: $fileType");
    header("Content-length: $fileSize");
    header("Content-Disposition: inline; filename=$fileName");
    header("Content-Description: from imagebank");
    header("Connection: close");
    echo $fileContents;
    }else{
    $numRows = mysql_num_rows($query);
    echo "File not found <br>";
    echo $numRows;
    echo " is the number of rows returned for id = ";
    echo $ID;
    ?>
    Hope that helps
    Phil

  • Problem displaying Blob column as an image

    Hi all,
    Ik have created an attribute (as part of an Entity Object and a View object) on top of a blob column.
    With JHeadstart I generated one insert group (display type fileUpload) and one query group (display type image).
    I managed to upload (and store) pictures.
    However when I query the pictures the folowing occurs:
    1. when I scroll through the records the first time the picture is shown OK
    2. the secod time when I scroll through the same dataset the picture is not shown...
    3. when I restart the pageGroup, the pictures are shown..
    Do you have any suggestions?

    A fix has been found, see the thread at Why the image only show first time?? for details.
    kind regards,
    Sandra Muller
    JHeadstart Team

Maybe you are looking for

  • Cannot re-save a file into the same folder

    Hi. I have a odd issue where users are unable to resave their documents into the folder that they have opened them from.  The folders in question are their home folders to which each user has full permission to access. You cannot save over the origin

  • Trackpad made useless

    Hi, I have a 17' Macbook Pro. Recently upgraded system to Mavericks 10.9.5.The trackpad is basically useless now (slow, jittery and unresponsive - with a mind of it's own), but a wireless mouse works fine. What happened and how to fix it?

  • Macbook vs ibook

    I am thinking of upgrading.  I am looking at refurbished laptops.  I am trying to see what the differences are between the macbooks and ibooks. I currently am using a very outdated imac.  I use the computer for e-mail...shopping..research on various

  • Failed to detect hard drive at the first boot

    My new system always failed to detect the hard drive at the first boot, but it's ok if restart it. Not use Raid (disabled). Any help will be greatly appreciated.  ?( Yingsheng KT3-Ultra-ARU AMD XP1900 GF2MX400 512 PC2100 Mushkin 300W Antec PSU   West

  • Procedure - Execute - Wrong Number of Arguments...

    Hi All, I am using the following block for executing procedure. But iam getting OUT parameter error. Error ORA:06550: line4,column9: PLS:00306: wrong number or arguments in call to PROCSS_PROC ORA:06550: line 4,column9 PL/SQL: statement ignored DECLA