Displaying Icons/Images in TextBoxes

I'm searching for a TextBox Class which can display Icons / Images as well. This is possible with the JTextPane, but it's not possible to copy/paste icons. Is there an improvement of this class or a better solution available?

http://blogs.adobe.com/aharui/2007/04/icons_in_combobox.html
This didn't work for you?
- Jason

Similar Messages

  • Display Icon/Image instead of Role name in top level navigation

    Hi,
    I want to display a image / icon instead of role name for a particular role. Can you please tell me how to achieve this ?
    Thanks,
    VP

    Hi,
    the thread is just for the background image (for all elements).
    if you want to display icons instead of role names, you have to create your custom top level navigation using the
    navigation taglib from SAP. There are lots of examples. make a blog search for Mr "Kannengiesser" from SAP.
    In case you are using already an EHPx in your EP 7.0 the AJAX framework might have this feature.
    Regards,
    Kai

  • How to display iconic images using forms 9i

    Hi,
    i had created a simple push button ,and made its properties iconic=yes and icon file name =c:\temp\save
    i had copied the save.GIF file in the c:\temp path
    also i had made necessary changes in the orion.web file
    and registry.dat
    actually i had the metalink document 203846.1 and followed all the step written in that doc.
    but then also during run time i am not able to see the icons.
    Can you give me a sample code having only one push button
    and all the changes in different files to make the icons appear in web.
    I had tried all the steps so pl give me the sample step by step code.
    Thanks ,
    Kumar Iyer

    Hi Kumar,
    I think if you follow the oracle note 203846.1 more or less it should be fine. I took a little exception on step 7 which requires modifying the registry.dat file.
    I ignored the step 7, try this in forms builder for button property
    1) icon filename=save
    2) create jar file for icons under c:\temp directory, using the command
    C:\Temp>jar -cvf icons.jar *.gif
    please note that file save.GIF should be save.gif since java is case sensitive.
    3) modify the following entries in file <9iDS_HOME>\forms90\server\formsweb.cfg
    archive_jini=f90all_jinit.jar,/forms90/icons/icons.jar
    imageBase=codebase
    so this should help in your test form to display icon at runtime.
    -Lokesh

  • Displaying Iconic Button images

    Hi,
    I have installed 9i Apps Server with Forms6i and have deployed an already existing application on it. The Iconic buttons are not displaying any images. Is there a patch that I need to install ? if yes, which one? Otherwise, whatelse needs to be done in order to deal with this problem ? Thanks for anyone's help in advance.

    I have all the gif in the directory and the physical directory's path is defined in Registry.dat file. Still no result and I cannot get the iconic button images. Appreciate your feedback but any other suggestions.

  • 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 : )

  • Display icons in Network ui element

    Hello everybody!
    Im trying to display some hierarchies in a Network ui element. Generally, this works fine, but I'm not able to display icons with the elements inside the applet. The examples in the JNet/JGantt Developer Documentation use <icon/>-tags with the path to a gif file in the Type Repository section like this
    <type name="SomeTypeName" inherits="SomeBaseTypeName">
         <icon space="5">apps/orgchart/chief.gif</icon>
    </type>
    and the Type Repository documentation tells me to
    Specify the relative address of the URL in relation to the code base of JNet.jar
    (a file in your own JAR. file: apps/slm/icon.gif, for example). If
    the relative path starts with apps, JNet automatically adds the
    missing com/sap/jnet. We recommend that you use the relative path
    wherever possible, because you can store the icon graphics in the same directory
    in Perforce as the type repository.
    But how would I determine the relative address of my icon files stored in my web dynpros src/mimes/components/<component name>-folder inside my WebDynpro jar/ear/whatever in relation to the code base of the JNet.jar which - I guess - would reside inside the WebDynpro runtime or somewhere else on the server, but not inside my own jar ? Or am I wrong about this ?
    Thanks a lot
    Michael

    Hi Christian!
    That's what I tried in the first place. The result is something like
    /usr/sap/XXX/J02/j2ee/cluster/apps/myCompany.com/my~webdynproapp/servlet_jsp/webdynpro/resources/myCompany.com/my~webdynproapp/root/Components/package.path.to.my.component/imagename.gif
    but the applet does not find the image files. Since the JNet documentation says to specify the relative path from the JNet.jar code base, I'd have to find out where that is and calculate the relative path, but possibly this will only work inside a single jar (which I don't have since the JNet.jar is somewhere among the portal WebDynpro runtime components, I guess).
    Preferrably, I'd like to have a look at a working example using the Network ui component with external icons inside a java WebDynpro. Propably someone has done that before...
    Thanks
    Michael

  • Need help in displaying an Image in a JLabel

    Hi everyone,
    I am using a JLabel to display images on a particular screen. I am facing some problem while doing so..
    On my screen there are images of some garments. When the users select colors from a particular list, i should color this garment images and load it on the screen again with the colors. I have a floodfill class for filling the colors in the images. The problem I am facing is I am able to color the image properly with my floodfill class but when displaying the image on the same jlabel, the image gets distorted somehow.
    Everytime I color the image, I create an ImageIcon of the image and use the seticon method from the JLabel class. First I set the icon to null and then set it to the imageicon created. here is the code I use.
    If 'image' is the the image i have to load
    ImageIcon imgicon = new ImageIcon(image);
    jlabel.setIcon(null);
    jlabel.setIcon(imgicon);I am setting the icon to null because I have not found any other method to clear the previous image from the jlabel.
    Can anyone who has worked on images before and faced a similar situation help me with this?? Is there some other container I can use besides the JLabel to display the images perhaps?
    Thanks in advance.....
    Bharat

    And the thing is when I first go into that screen with the selected colors it is displaying the images perfectly.
    It is only giving problems when I pick different colors on the screenit really sounds like the problem is in your floodfill class.
    I have no idea what's in floodfill, but if you were e.g. using a JPanel and paintComponent,
    you would need to have as the first line in paintComponent()
    super.paintComponent(..);
    to clear the previous painting.
    if not, you would be just drawing over the top of the previous paintComponent(), and if the calculation of the
    painting area is not 100% exact, you may get the odd pixel not painted-over, meaning those pixels will display
    the old color.

  • How To Display an Image in a Display Image Page Item

    i have a pageitem textbox called SearchBox , a Button called Search and a Display Image called Image
    i to display and image upon inserting an ID into the searchbox. It work alright if i put a static ID in the BLOB Column returned by SQL statement in Display Image
    Note the facialimage of datatype BLOB
    Sample
    ===
    select facialimage
    from voter_v
    where voterid= 34343434;
    But when i do it with a bind variable like the pageItem SearchBox
    it doesnt on the click of the Button
    what can be the problem
    Sample
    ===
    select facialimage
    from voter_v
    where voterid= :P1_VOTERSEARCH;

    Hi,
    can you please setup an example on apex.oracle.com and let me know the login credentials for the workspace. I think that will be the easiest to sort this out.
    Regards
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • [Forum FAQ] How to display an image from Http response in Reporting Services?

    Question:
    There is a kind of scenario that users want to display an image which is from URL. In Reporting Services, if the URL points to an image file, we can directly display it by typing the URL in embedded image. However, some URLs are just sending Http requests
    to server side, then redirect to another position and the server will return the image. For these kind of URLs, Reporting Services can’t directly render the image from Http response.
    Answer:
    To achieve this goal, we can add custom code into the report. Pass the URL as argument into our custom function so that we can create HttpRequest and get the HttpResponse. Then we can use custom function to return the Bytes() from the HttpResponse and render
    it into an image in report.
    Ps: In Reporting Services, it only support drawing Bytes() array into image, so we need to have our custom function return Bytes array.
    Add the assembly and custom code into the report.
    Public shared Function GetImageFromByte(Byval URL as String) As byte() 
                    Dim photo as System.Drawing.Image 
             Dim Request As System.Net.HttpWebRequest 
           Dim Response As System.Net.HttpWebResponse 
                  Request = System.Net.WebRequest.Create(URL)         
                     Response = CType(Request.GetResponse, System.Net.WebResponse) 
                 If Request.HaveResponse Then  
                      If Response.StatusCode = Net.HttpStatusCode.OK Then                    
                           photo = System.Drawing.Image.FromStream(Response.GetResponseStream) 
                     End If 
                 End If 
                  Dim ms AS System.IO.MemoryStream = new System.IO.MemoryStream() 
                 photo.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg) 
                    Dim imagedata as byte()  
                    imagedata = ms.GetBuffer()  
                    return imagedata
    End Function
    Grant the permission for assemblies. 
    Go to: 
    C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\RSpreviewPolicy.config 
    C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\ReportServer\rssrvpolicy.config
    Give “FullTrust” for Report_Expressions_Default_Permissions.
    Insert an image into report. 
    Expression:
    =Code.GetImageFromByte("https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcSrVwPoAtlcA2A3KaiAJi-XjS4icr1QUnKYr7uzpX3IL3g2GPisAQ")
    The Result looks below:
    Applies to:
    Reporting Services 2005
    Reporting Services 2008
    Reporting Services 2008 R2
    Reporting Services 2012
    Reporting Services 2014
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    >
    Hi, I'd like to display a dynamic image from the web inside a JLabel or any other swing component it could work in. I've been looking on the Swing tutorials and others forums, all I can have is that a JLabel can load an Icon object, defined by an image URL, but can this URL be like "http://xxxxx/image.jpg" somehow or can it only be a local image URL?>
    I do not know why you start talking about an image on the web then go on to show concerns about whether it will work for a 'local' URL.
    But perhaps this answer will cover the possibilities.
    So long as you can from an URL to the image, and the bytes are available for download (e.g. some web sites wrap a direct call to an image in HTML that embeds the image), the URL based icon constructors will successfully load it.
    It does not matter if that URL points to
    - a web site,
    - a local server ('localhost'),
    - an URL representation of a File on the local file system, or
    - it is inside a Jar file that is on the application's run-time classpath.
    How you go about forming a valid URL to a 'local resources' (or indeed what you regard as local resources) is another matter, depending on the form of the project, and how the resources are stored (see list above).
    Probably the main reason that examples use images at a hard coded URL on the net is that it makes an 'image example' self contained. As soon as we compile and run it, we can see the result. I have posted a few examples like that on these forums.
    Edit 1:
    BTW - Welcome to the Sun forums
    Edited by: AndrewThompson64 on Apr 21, 2009 12:15 PM

  • How to set folder icon image in OS X Lion?

    I set my folder's icon image in OS X Leopard before, but I don't know how to do that in Lion.  In Leopard you simply copy the icon image from an Info window of a file, and paste that into the folder's icon image in the top left corner of its Info window.  In Lion I don't see the icon of the file in its Info window as a preview, but rather I see only a generic JPG file icon.  Any ideas?

    Can you explain why there was no thumbnail for that file?
    The OS does not create or add thumbnails, previews, nor custom icons to images or other files. Although it displays files with what appears to be a custom icon, it is not part of the file itself; it is created on the fly, just for display. Since it is not part of the file, it does not appear in the Get Info window.
    Back in OS 9 days when you downloaded an image file from the web, either via drag and drop or via the download mechanism, the image file would typically be placed on the drive as a QuickTime image with both a custom icon and a preview image added to it.
    I skipped earlier versions of OS X, and started with Snow Leopard, so don't know about earlier versions of OS X. Apparently the auto creation and addition of a custom icon and preview have been dropped in later versions in favor of using Preview to generate a temporary (for display only) custom icon on the fly. One result of this is that image file sizes are kept reasonably small - adding a suite of custom icons and a preview image to the file itself increases the file size a lot; it's not unusual for those additions to double the file size, or more.

  • How do I display an image in an APPLICATION

    I have the following code and I want to display an image. I figured that the easiest way to display an image was via a JLabel.
    import javax.swing.*;
    import java.awt.*;
    public class NewMain {
        public static void main(String[] args) {
            JFrame win = new JFrame("TestApp");
            win.setDefaultCloseOperation(win.EXIT_ON_CLOSE);
            win.setBounds(0,0,200,200);
            ImageIcon icon = new ImageIcon("ca.bmp");
            JLabel label = new JLabel("",icon,JLabel.CENTER);
            win.add(label);
            win.setVisible(true);
    }What am I doing wrong. I have the cd.bmp file in the source directory but I just get an empty frame when I run the program...
    PS: I get a lot of hate messages in other forums. I am BRAND new to programming anything (especially OOP). I realize I suck at this but that is why I am trying to learn.

    You need to become familar with Sun's tutorials, like this one about labels:
    http://java.sun.com/docs/books/tutorial/uiswing/components/label.html
    It has an example and code for what you want to do.

  • JPG won't display in Image box.

    Trying to add a logo in JPG format to the top of the form using the Image control, but it won't display the image nor print it. If I use a GIF file it works fine, but looks horrible. I'm new at this, any ideas?

    I finally figured it out after posting another frustrating comment to this thread. I can't take the credit, however, as it was quickly solved by Irv Kanode in another thread. I have copied his exact post below. It solved this issue in seconds:
    ADOBE SUPPORT REPLY:
    Irv Kanode - 4:15pm May 5, 06 PST (#1 of 2)
    Check some of your JPEGs for CMYK vs RGB.
    Might the ones that fail be CMYK and the ones that work be RGB?
    When images don't work are you seeing a broken image icon or...?
    Irv
    Adobe Support
    USER FOLLOWUP TO ADOBE SUPPORT SUGGESTION:
    Kurt Wedberg - 5:27pm May 5, 06 PST (#2 of 2)
    Irv,
    Thanks for the reply. The images that didn't work were CMYK. When I converted to RGB they worked.
    The images that didn't work were coming up with random grey scale colors.
    Thanks again,
    Kurt
    Hope this helps everyone!

  • Can an Acrobat form have a field that allows you to select and display an image?

    Hello,
      I'm trying to streamline my most frequent job duty. I work for a box plant and I spend most of my day creating or updating Print Cards. These are letter sized pages that contain the job information along the top and an image of the package laid flat below. What I'm trying to do is make the Print Card a form that I can fill in, and have the final field ask me to select the image. I would then browse for my package design and drop it into the specified field.
      Is this possible? It seems like it should be. I'm fairly illustrator savvy, but I've yet to really get my hands on Acrobat (though I get more excited about it the more research I do).
      Eventually, I want to turn this single form into a full portfolio that would be linked pdf versions of every form we currently use. The info would then be uploaded and assessable by anyone on our team. I don't know how to do half of that, but I'm learning.   So I guess, expect to see me post on this for a while.
    -Jefferson

    Yes, you can set up a button that has a layout other than "Label only" and  use the following as the Mouse Up JavaScript for the button:
    // Mouse Up script for button
    event.target.buttonImportIcon();
    You will then be prompted to select a file as the source of the button icon. You can choose form a number of file types. You should then set the button to read-only before sending the PDF.
    To trigger the import from a different button, bookmark, link, etc., the script would be:
    getField("image_button").buttonImportIcon();
    Replace "image_button" with the actual name of the button that will display the image.

  • Displaying an image in a dialog box

    What i was trying to do in my last post was basically call a frame from within a frame and display an image in it. I've researching it a bit more, i think a dialog box would be the better idea(Cheers for the suggestion on the dialog box). I have the image stored in the frame below. What i would like to do is display it as the parent paremeter, but i can't seem to get it to work. Its just a normal sized picture that i need to display, i can't seem to see what to change, hope i have explained it well enough for ye
    Help would be great thanks
    Ambrose
    JFrame dummyFrame = new JFrame();
              ImageIcon icon = new ImageIcon("Standard.png");
              dummyFrame.setIconImage( icon.getImage() );
              String output7 = "The Requested Picture";
              JOptionPane.showMessageDialog(null, output7, " ", JOptionPane.INFORMATION_MESSAGE);     

    I'm a little fuzzy on what you're trying to accomplish.
    Do you understand that JFrame.setIconImage sets the image to be used for the frame on the taskbar, and as the tiny icon on the caption bar? It doesn't appear inside the frame. (I'm talking Windows here when I say "taskbar", of course, but the idea is the same in other OS's.)
    If when you say you just want to display an image in a frame, you mean, well, try this and see if it's what you want:
    JFrame myFrame=new JFrame("My Frame");
    Container content=myFrame.getContentPane();
    ImageIcon icon=new ImageIcon("Standard.png");
    JLabel imagearea=new JLabel(icon);
    content.add(imagearea,BorderLayout.CENTER);
    myFrame.pack();
    myFrame.show();

  • Display the images in excel using jsp

    Hi
    I am unable to display the images in excel using jsp. I can display the data. but cannot display the images. It is simply showing the icon without the image. Is there any way to display the images. Pls give some sample code to display the images in excel.
    Thanks in advance.

    Presumably whoever created the images in that Excel document just put links to somewhere on their hard drive. Those links don't mean anything when you put the document on somebody else's computer, which is what you are doing. At least, that is my guess.
    You could spend some time looking at the Excel file to see how the images were put in there. Or you could ask the person who put the images in there.

Maybe you are looking for