How to add multiple images in jinternalframe

Hi all,
how to add multiple images to the jinternalframe, at specified location of the pane and resizing the images with specified height and width.
code examples are highly appreciated.
Thanks & Regards,
Abel

Thanks, it works perfectly. It's a really smart way of fixing the problem too :)
I also found your toggle button icon classes which is something I've also had a problem with.
Thanks.

Similar Messages

  • How to add multiple images to a JLabel from the jar file

    I want to add multiple images in a JLabel but the icon property only allows me to add one. I thought I could use html rendering to add the images I need by using the <img> tab, but I need to use a URL that points to the image.
    How do I point to an image inside the jar file? If I can't, is there another way to show multiple images in a JLabel from the jar file?

    Thanks, it works perfectly. It's a really smart way of fixing the problem too :)
    I also found your toggle button icon classes which is something I've also had a problem with.
    Thanks.

  • How to add multiple images to panel

    Hi, i am trying to add more than 1 image to a panel, but i cant work out how. have the following code, but it means i have to create a new panel each time. i only want to use 1 panel, and add images to this one panel. the images are transparent and i layer them over each other. I mouse listener to get the coordinates when the user clicks over the image, and for this i need to use a panel, unless anyone can show me another way????
    cheers for any advice,
    ness
    public class test extends Applet
    DrawPanel dp;
    public void init()
    Image im1 = getImage(getDocumentBase(),"images/panel1.gif");
    Image im2 = getImage(getDocumentBase(),"images/front.gif");
    MediaTracker mt = new MediaTracker(this);
    mt.addImage(im1,0);
    mt.addImage(im2,0);
    try{mt.waitForAll();}
    catch(InterruptedException ie){}
    dp = new DrawPanel(im1);
    //here i want to add im2 image to dp panel but how???????
    setLayout(new BorderLayout());
    add(BorderLayout.CENTER,dp);
    class DrawPanel extends Panel
    Image im;
    Image im1;
    Image im2;
    public DrawPanel(Image im)
    im = im;
    public void paint(Graphics g)
    if (im != null)
    g.drawImage(im1,0,0,this);
    g.drawImage(im2, 20, 20, this);

    I've modified the code so that you can send DrawPanel an array of images where index 0 in the array will be draw on the bottom and 1 on top of that, 2 on top of that, and so on. You'll need to add the 20,20 offset somewhere if you want to include that too. Good Luck!
    public class test extends Applet
        DrawPanel dp;
        public void init()
            Image im1 =
            getImage(getDocumentBase(),"images/panel1.gif");
            Image im2 = getImage(getDocumentBase(),"images/front.gif");
            MediaTracker mt = new MediaTracker(this);
            mt.addImage(im1,0);
            mt.addImage(im2,0);
            try{mt.waitForAll();}
            catch(InterruptedException ie){}
            /** Declare array and place two images in it **/
            Image[] images = new Image[2];
            images[0] = im1;
            images[1] = im2;
            dp = new DrawPanel(images);
            setLayout(new BorderLayout());
            add(BorderLayout.CENTER,dp);
    class DrawPanel extends Panel
        Image[] ims;
        public DrawPanel(Image[] im)
            ims = im;
        public void paint(Graphics g)
            super.paint(g);
            for(int i=0; i<ims.length; i++)
                if (ims[i] != null) g.drawImage(ims,0,0,this);

  • How do I add multiple images into one file?

    I'm sure this is something that's been covered in another post (or even in the help portal) but I think my wording in my search terms are not correct or... I don't know, because I just can't find what I'm looking for.
    I want to know how to add multiple images into one file/one image, both horizontally and/or vertically. To give you an idea of what I mean, check out :
    http://www.best10apps.com/apps/comic-story,531596060.html
    If you scroll down, you'll see a heading entitled : Screenshots of Comic Story. Notice how there's 3 pictures (divided by borders). 2 of those pictures are side by side, and 1 of them is below the first 2 pictures.
    I want to know how to add different pictures/images and put them into one picture.

    One way is to create template PSD files and populate them with your images using Photoshops scripts.
    Photo Collage Toolkit UPDATED June 12, added Picture Package Support via PasteImageRoll and BatchPicturePackage scripts.
    The package includes four simple rules to follow when making Photo Collage Template PSD files so they will be compatible with my Photoshop scripts.
    There are eleven scripts in this package they provide the following functions:
    TestCollageTemplate.jsx - Used to test a Photo Collage Template while you are making it with Photoshop.
    CollageTemplateBuilder.jsx - Can build Templates compatible with this toolkit's scripts.
    LayerToAlphaChan.jsx - Used to convert a Prototype Image Layer stack into a template document.
    InteractivePopulateCollage.jsx - Used to interactively populate Any Photo Collage template. Offers most user control inserting pictures and text.
    ReplaceCollageImage.jsx - use to replace a populated collage image Smart Object layer with an other image correctly resized and positioned.
    ChangeTextSize.jsx - This script can be used to change Image stamps text size when the size used by the populating did not work well.
    PopulateCollageTemplate.jsx - Used to Automatically populate a Photo Collage template and leave the populated copy open in Photoshop.
    BatchOneImageCollage.jsx - Used to Automatically Batch Populate Collage templates that only have one image inserted. The Collage or Image may be stamped with text.
    BatchMultiImageCollage.jsx - Used to Automatically Batch Populate Any Photo Collage template with images in a source image folder. Easier to use than the interactive script. Saved collages can be tweaked.
    BatchPicturePackage.jsx - Used to Automatically Batch Populate Any Photo Collage template with an image in a source image folder
    PasteImageRoll.jsx - Paste Images into a document to be print on roll paper.
    Documentation and Examples

  • How can I add a button to add multiple image in PDF from using adobe acrobat pro?

    I have to create a pdf form using Adobe Acrobat Pro X.
    In this form I want to add a button where I can add multiple images to the field.
    I have tried using javascript event.target.buttonImportIcon(); and successfully add an image, but when I want to add the 2nd image it automatically overwrites the previous one.
    Is there any way to solve this issue? I would like to have a form where I can add a lot of images in it. It is possible in word, but we really have to use adobe.
    Thanks

    Hi thanks for your answer.
    I can add multiple button, but if there are 10 images that I wan to add, then I have to create 10 buttons.
    Moreover, the pictures will be placed on top of each other and it means that you cannot see it clearly.

  • How to add an image in multiple pages?

    Hi,
    First be aware that before posting this, I digged into Google but could not find a solution.
    How to add an image in the footer section of a PDF document of size, say, 500pages? I am not going to add it one by one in very page, it's too time consuming.
    Is there a way to add it in the footer section or any other alternative, so that I end up with the same image in an exact position in all 500 pages?
    Thanks for your reply
    Best,
    Eric

    Answer:
    Answer: http://forums.adobe.com/message/3437269#3437269

  • How to import multiple images at the same time in illustrator?

    How to import multiple images in a document at the same time in illustrator?
    It's possible?

    Script: Place Multiple Files in Illustrator (Kelso)
    http://kelsocartography.com/blog/?p=2047

  • How to have multiple images on the same screen? like in the movies where you see several actions at

    how to have multiple images on the same screen? like in the movies where you see several actions at the same time ....
    i don't find  a tutorial in adobe tv....
    thanks !!

    The short answer is that you'll put the source clip(s) for each inset on a different video track, all stacked up. Then use the Scale and Position effects (under "Motion" on the Effect Controls panel) to reduce their size and place them where you want.
    If the content of an inset will involve edited content (where you're cutting among various clips or just trimming out unwanted content from a single clip), then you'll probably find it easier to do all those edits in one sequence, then nest that sequence in the master sequence, where you apply the Scale and Positioning effects. That will save the step of applying the scale and position effects to each edited track item.

  • How to add multiple users to a role in ECC 6.0

    How to add multiple users (say 1000) to a role in ECC 6.0?

    Hi
    You can actually add multiple users to a role using transaction SU01. From SU01, use the menu Environment->Mass Changes.
    Here you can manually add the users, select them by address or authorisation data. Once you have your user list, you can then add or remove roles and/or profiles.
    Secondly , You can use SU10 to do mass changes to multiple users including role assignments per logical systems
    Also check the following link:
    http://www.sap-img.com/bc021.htm
    I hope this should do it
    regards
    Chen

  • How to add an image file to Oracle db?

    Need help urgently....Anybody knows how to add an image file (example: jpg)into one of the fields in Oracle database??

    This will do the job..
    package forum;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.util.*;
    import java.sql.*;
    import oracle.jdbc.driver.*;
    //import oracle.sql.*;
    Wanneer een request.getInputStream wordt geconferteerd naar een "String" (zie later) dan ziet de output in tekstformaat er als volgt uit:
    -----------------------------7d280152604f4 Content-Disposition: form-data; name="oploadfile"; filename="C:\WINNT\Profiles\mvo\Desktop\boodschap.txt" Content-Type: text/plain Deze boodschap dient te worden ge-insert in de database. -----------------------------7d280152604f4 Content-Disposition: form-data; name="StadID" 1234 -----------------------------7d280152604f4 Content-Disposition: form-data; name="SuccessPage" /forum/error.jsp -----------------------------7d280152604f4--
    of opgesplitst
    contentType........... multipart/form-data; boundary=---------------------------7d235ade00f0
    filename.............. "C:\Documents and Settings\Administrator\Desktop\boodschap.txt"
    MIME type............. text/plain
    Wat in database moet.. Dit is de eigenlijke boodschap die moet worden ge-insert in de database.
    Eind boundary......... -----------------------------7d235ade00f0 Content-Disposition: form-data; name="file1"; filename="" Content-Type: application/octet-stream -----------------------------7d235ade00f0--
    We gaan achtereenvolgens:
    1. Kijken of het van het "multipart/form-data" type is (uploaden) en strippen van eerste boundery.
    1.a Geen "multipart/form-data" ? dan... error message
    1.b Groter dan MAX_SIZE ?..dan .. error message
    2. Filenaam van de te uploaden file uitlezen
    3. Mimetype bepalen en bepalen in welke positie van de string het Mimetype ophoudt, cq waar te uploaden file begint
    4. Bepalen waar eind boundery begint
    5. De eigenlijke file uitlezen
    6. Terug converteren naar bytes
    public class WriteBlob extends HttpServlet {
    public static final int MAX_SIZE = ParameterSettings.imageUpload;
    String successMessage = "";
    public void init(ServletConfig config) throws ServletException {
    super.init(config);
    * Process the HTTP Get request
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    DataInputStream in = null;
    FileOutputStream fileOut= null;
    PrintWriter out = response.getWriter();
    int kb_size = 0;
    boolean pass2 = true;
    String message = "";
    String responseRedirect = "/forum/uploaden.jsp?message="+" Uploaden geslaagd";
    try
    //get content type of client request
    String contentType = request.getContentType();
    // Start stap 1...content type is multipart/form-data
    if(contentType != null && contentType.indexOf("multipart/form-data") != -1)
    //open input stream
    in = new DataInputStream(request.getInputStream());
    //get length of content data
    int formDataLength = request.getContentLength(); // totale lengte van de inputstream
    //initieer een byte array om content data op te slaan
    byte dataBytes[] = new byte[formDataLength];
    //read file into byte array
    int bytesRead = 0;
    int totalBytesRead = 0;
    int sizeCheck = 0;
    while (totalBytesRead < formDataLength)
    //kijken of de file niet te groot is
    sizeCheck = totalBytesRead + in.available();
    if (sizeCheck > MAX_SIZE)
    pass2 = false;
    message = "Sorry. U kunt slechts bestanden uploaden tot een grootte van 500KB";
    responseRedirect = "/forum/uploaden.jsp?message="+message;
    bytesRead = in.read(dataBytes, totalBytesRead,formDataLength);
    totalBytesRead += bytesRead;
    if (pass2==true)
    kb_size = (int)(formDataLength/1024);
    //create string from byte array for easy manipulation
    String file = new String(dataBytes);
    /*get boundary value (boundary is a unique string that separates content data)
    contentType........... multipart/form-data; boundary=---------------------------7d235ade00f0
    int lastIndex = contentType.lastIndexOf("=");
    String boundary = contentType.substring(lastIndex+1, contentType.length());
    // Stap 2.....bepaal de naam van de upload file
    // filename.............. "C:\Documents and Settings\Administrator\Desktop\boodschap.txt"
    String saveFile = file.substring(file.indexOf("filename=\"")+10);
    saveFile = saveFile.substring(0,saveFile.indexOf("\n"));
    saveFile = saveFile.substring(saveFile.lastIndexOf("\\")+1,saveFile.indexOf("\"")); //naam van de file...boodschap.txt
    String saveFileName = saveFile;
    // Stap 3..Bepaal MIME Type en de positie van eind mime type in string
    voorbeeld: -----------------------------7d23d21220524 Content-Disposition: form-data; name="file0"; filename="C:\WINNT\Profiles\mvo\Desktop\z clob.txt" Content-Type: text/plain
    String restant = "";
    int pos; //position in upload file
    // bijv .. filename="C:\Documents and Settings\Administrator\Desktop\boodschap.txt"
    pos = file.indexOf("filename=\"");
    //find position of content-disposition line
    pos = file.indexOf("\n",pos)+1; // eing file naam + spatie
    // onderstaand geeft bijv Content-Type: text/plain
    restant = file.substring(pos,file.indexOf("\n",pos)-1);
    restant = restant.substring(restant.indexOf(":")+2,restant.length()); // MIME type
    String mimeType = restant;
    //find position of eind content-type line
    pos = file.indexOf("\n",pos)+1;
    //find position of blank line
    pos = file.indexOf("\n",pos)+1;
    int start = pos;
    // Stap 4 eind boundary
    /*find the location of the next boundary marker (marking the end of the upload file data)*/
    int boundaryLocation = file.indexOf(boundary,pos)-4; //waarom -4 ..? ziet er uit als linebreak spatie--boundary=-----------------------------7d21c9ae00f0
    // Stap 5 en 6..de eigelijke te uploaden file in nieuwe byte file inserten
    byte dataBytes2[] = new byte[boundaryLocation-start]; //declareren
    for (int i=0;i<(boundaryLocation-start);i++) // inserten BELANGRIJK !!
    dataBytes2=dataBytes[start+i];
    String next_id = "0";
    Statement statement = null;
    Connection conn = null;
    boolean pass = true;
    ResultSet rs = null;
    Statement stmt_empty = null;
    oracle.sql.BLOB blb = null;
    try
    int vendor = DriverUtilities.ORACLE;
    String username = ConnectionParams.userName;
    String password = ConnectionParams.passWord;
    String connStr = DriverUtilities.makeURL(vendor);
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    conn = DriverManager.getConnection(connStr,username, password);
    if (conn==null){pass=false;}
    } catch (Exception e){out.println("<P>" + "There was an error establishing a connection:");}
    if (pass==true)
    try
    String seq_nextval ="select forum_blob_seq.nextval from dual";
    statement = conn.createStatement();
    ResultSet rset = statement.executeQuery(seq_nextval);
    while (rset.next())
    next_id = rset.getString(1);
    if (next_id.equals("0"))
    message = "Uploaden mislukt !...Er ging wat fout tijdens de interactie met de database";
    responseRedirect = "/forum/uploaden.jsp?message="+message;
    pass = false;
    } catch (Exception e1) { out.println("Error blob1 : "+e1.toString()); };
    } // end pass
    if (pass==true)
    try
    Statement stmt2 = conn.createStatement();
    String insert_empty_blob = "INSERT INTO test_blob(id "+
    ",filename "+
    ",mimetype "+
    ",kb) "+
    "VALUES("+Integer.parseInt(next_id) +
    ",'"+saveFileName+"'"+
    ",'"+mimeType+"'"+
    ","+kb_size+")";
    stmt2.executeQuery(insert_empty_blob);
    conn.commit();
    if (stmt2!= null) {stmt2.close();}else{stmt2.close();pass = false;}
    } catch (Exception e2){
    message = "Uploaden mislukt !...Er ging wat fout tijdens de interactie met de database";
    responseRedirect = "/forum/uploaden.jsp?message="+message;
    out.println("<P>" + "2. There was an error inserting mime type:");}
    } //end pass
    if (pass==true)
    try
    conn.setAutoCommit(false);
    } catch (Exception e3) { pass = false; out.println("Error blob 3: "+e3.toString()); };
    } //end pass
    if (pass==true)
    try
    String Query_blob ="Select test_blob FROM test_blob where id="+next_id+" FOR UPDATE";
    stmt_empty = conn.createStatement();
    rs=stmt_empty.executeQuery(Query_blob);
    } catch (Exception e4) {
    pass = false;
    out.println("Error blob 4: "+e4.toString());
    message = "Uploaden mislukt !...Er ging wat fout tijdens de interactie met de database";
    responseRedirect = "/forum/uploaden.jsp?message="+message;};
    } //end pass
    if (pass==true)
    try
                             if (rs.next())
                             blb = ((OracleResultSet)rs).getBLOB(1);
                        OutputStream stmBlobStream = blb.getBinaryOutputStream();
                             try {
                                  int iSize = blb.getBufferSize();
                             byte[] byBuffer = new byte[iSize];
                             int iLength = -1;
    ByteArrayInputStream stmByteIn = new ByteArrayInputStream(dataBytes2);
                                  try {
    // while ( (iLength = in.read(byBuffer, 0,      iSize)) != -1 )
    while ( (iLength = stmByteIn.read(byBuffer, 0,      iSize)) != -1 )
                                       stmBlobStream.write(byBuffer, 0, iLength);
                                       stmBlobStream.flush();
                                       } // end while
    } catch (Exception e5) {
    pass=false;
    out.println("Error blob 5: "+e5.toString());
    message = "Uploaden mislukt !...Er ging wat fout tijdens de interactie met de database";
    responseRedirect = "/forum/uploaden.jsp?message="+message; }
                                  finally { conn.commit();     }
    } catch (Exception e6) { out.println("Error blob 6: "+e6.toString()); };
                             } //end if rs.next()
                             else {      throw new SQLException("Could not locate message record in database."); }
    } catch (Exception e7) { out.println("Error blob : "+e7.toString()); };
    } // end pass
    } // end pass2
    else //request is not multipart/form-data
    message = "Uploaden mislukt !...Gegevens niet verstuurd via multipart/form-data.";
    responseRedirect = "/forum/error.jsp?message="+message;
    out.println("Request not multipart/form-data.");
    catch(Exception e)
    try
    //print error message to standard out
    out.println("Error in doPost: " + e);
    //send error message to client
    out.println("An unexpected error has occurred.");
    out.println("Error description: " + e);
    }catch (Exception f) {}
    response.sendRedirect(responseRedirect);
    public void doGet(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException {
    doPost(request,response);
    Regards
    Martin

  • How to add an image to combo box model in java

    i want to display a images.for that i take a combox.in that i want to add al images those i want to display, while clicking the image in combo box the image will be display.there is no problem for displaying an image, but i dont know how to add
    an image to a combo box model in net beans. please help me. if u have any idea plese forward to this mail
    [email protected]

    Hi Thomas,
                     You need to create an image field and in the source choose 'graphic content ; give the name of the variable which has the binary data . and give the type as 'MIME/image'.

  • How to add an image to an IMAGE control in Java WebDynpro

    hi
    How to add an image to an IMAGE control in Java WebDynpro.
    Please give me the steps to assign an image to an IMAGE control.
    Advanced Thanks
    brahma

    Thank You Mathan MP,
    i tried these steps, but whenever i selected the source property of image UI control, it opens a context window, but this context window does't contain any thing for selection.
    so how to solve this problem ?
    the link whatever u provided is not opened, please send the correct link.
    http://127.0.0.1:1284/help/index.jsp?topic=/com.sap.devmanual.doc.user/f3/1a61a9dc7f2e4199458e964e76b4ba/content.htm
    Thanks in Advance
    brahma

  • How to add an image to a JPanel ?

    hi,
    do you now how to add an image to a JPanel ?
    thanks a lot !

    You can either use the Graphics method drawImage from the panel's paintComponent(Graphics g) method, or you can create an ImageIcon, with your Image in its constructor. And then create a JLabel, passing that ImageIcon in its constructor. Then, you can simple use the panel.add() method to add that JLabel.
    For using the paintComponent method, check out the thread already posted above (I'll type it in again just in case)
    http://forum.java.sun.com/thread.jsp?forum=31&thread=288769
    If you want to use a JLabel, you can do something like this:
    Image img;
    JLabel label = new JLabel(new ImageIcon(img));
    JPanel panel = new JPanel();
    panel.setLayout(new FlowLayout());
    panel.add(label);Val

  • How to add an image in a JPanel

    Hi All,
    How to add an image in a JPanel and make it display.
    Thanks,

    I have tried with the below code. If I there is any fault please correct me.
    import java.awt.event.*;
    import java.awt.*;
    import javax.swing.*;
    public class HomePage extends JFrame implements     ActionListener {
        JButton cmdClick;
        JLabel label;
        JPanel homePanel = new JPanel();
        JPanel headPanel = new JPanel();
        JPanel btPanel = new JPanel();
        private JPanel mainPanel = new JPanel(new CardLayout());
        CardLayout cl;
        CalScenario calcFrame = null;
        public HomePage() {
           setTitle("Test Kit");
           setSize( 1008,399);
           setBackground( Color.gray );
           setResizable(false);
           Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
           Rectangle window = getBounds();
           setLocation((screen.width - window.width) / 2, (screen.height - window.height) / 2);
           setVisible(true);
            homePanel.setLayout(new BorderLayout());
            headPanel.setPreferredSize(new Dimension(1008,153));
            label = new JLabel("Main menu");
            headPanel.add(label);
            headPanel.setBackground(Color.CYAN);
            ImageIcon icon = new ImageIcon("images/slash.gif");
            JLabel imglabel = new JLabel();
            imglabel.setIcon(icon);
            headPanel.add(label);
            this.getContentPane().add(headPanel);
            btPanel.setBackground(Color.ORANGE);
            cmdClick = new JButton("Click here");
            btPanel.add(cmdClick);
            cmdClick.addActionListener(this);
            homePanel.add("North",headPanel);
            homePanel.add("West",btPanel);
            calcFrame = new CalScenario(mainPanel);
            mainPanel.add(homePanel, "HomePanel");
            mainPanel.add(calcFrame, "CalcFrame");
            cl = (CardLayout) (mainPanel.getLayout());
            add(mainPanel);
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        public void actionPerformed(ActionEvent source)  {
          if (source.getSource() == (JButton) cmdClick) {
                cl.show(mainPanel, "CalcFrame");
        public static void main( String args[]) {
             HomePage homeFrame = new HomePage();
             homeFrame.setVisible(true);
    }

  • How to add an image over another using af:image

    How to add an image over another using af:image
    Thanks,
    Veera

    i have a image which is black strip. i have added that to af:image
    <af:image source="image1" id="image" />
    on the black strip, i need to add company logo.
    how to achieve it.
    Thanks,
    Veera.

Maybe you are looking for

  • How to store data,key,cert,... in javacard

    I'm newbie in javacard I develop it by use RMI model I develop to similar EMV specification but don't exactly EMV spec told me that data element such as KEY, CERT,COUNTER,ExpirationDate,...anything. will be keep in file , with tree structure. above i

  • Problem in transaction F-63 (Internaly FBV1)

    Hi when i am running a session through SM35 to Parked the data using transaction F-63 ( internaly FBV1) after comlete the session the parked document is not displaying in bottem of the sytem and as well as it is not updating the BKPF table but when i

  • WD-Element TABLE Setting 1st Row

    Hello, in WD(ABAP) I use a TABLE-Control. It is bind to a node. The node is bind to a internal table with a lot of entries. Now I want ro show the Rows beginning at specific row , greater than 1 at startup-time. The example should show the rows 30 to

  • Sending a mail in a projector(.exe) please help, I'm desperate!!!!

    I am using flash mx and I created a .exe but I when I press an email I want my program to open the users outlook or mail program. I tried using jugglor but this has caused me more trouble than a solution because it runs differently in every computer

  • PL/SQL Reference

    I'm trying to find a reference for basic pl/sql syntax (ie creating functions and stored procedures). Is there a guide somewhere on OTN? Thanks!