Urgent..!!! Image Icon in Title of JDialog

Hi,
Can sombody tell me how to set Image Icon on the title of the JDialog window?.
Thanx in advance
Novi

In order to change the icon image in a JDialog, you have to set it in the Frame owner. For example:
JFrame frame = <whatever>;
Image image = <whatever>;
frame.setIconImage(image);
JDialog dialog = new JDialog(frame); // if this dialog displays an icon, it will be the same as that of the JFrameShaun

Similar Messages

  • I would like to print out the icon and title of each of my apps to another document for printing and sharing within my family

    I would like to print out the icon and title of each of my IOS apps to another document for printing and sharing within my family.  My son has my old iPod touch so I erased it so he could put whatever games he wants to play on that I used to play with.  It is difficult to download every game at one time because there is too much to download at one time.  I have many hundreds of apps.  One way I found was to create a screen grab of each page in iTunes  then open it in Preview contact sheet but that is really tiny unreadable image of each screen.  I also tried importing a screen shot of the contact sheet into Paint 2 and magnifying it on several pages but that is really blurry.  The ideal solution would be to import the icon and text to another app or to provide a print list of apps solution within iTunes.

    Create iPad screen shots by briefly pressing the home and on/off buttons together.  You will hear a shutter click sound and find a screen shot on your iPad's Camera Roll.  You can then print these screen shots as you would any iPad photos.
    UPDATE: I assumed you had an iPad.  Hopefully your iOS device does have an on/off and home button and is capable of producing screen shots.

  • Image Icon with JAR

    Hi,
    I would like to replace the standard coffee cup window icon with a custom image for a stand-alone Swing application, all packaged as a JAR file. As a quick test, I wrote the following:
    package me.swinginfo1;
    import javax.swing.ImageIcon;
    import javax.swing.JFrame;
    public class IconWindow extends JFrame {
         public IconWindow() {
              this.setSize(300, 200); //set the window size
              this.setLocationRelativeTo(null); //centers window on screen
              this.setTitle("Window with Icon"); //set the window title
              this.setDefaultCloseOperation(EXIT_ON_CLOSE); //end the program when window closed
              java.net.URL imageURL = this.getClass().getResource("images/red_circle.png");
              this.setIconImage(new ImageIcon(imageURL).getImage());
         * Executes Swing window... no arguments.
         public static void main(String[] args) {
              IconWindow myWindow = new IconWindow();
              myWindow.setVisible(true);
    When I run this class from the IDE (Eclipse, in this case), the program runs fine, and my icon image appears in the corner of the window as desired. However, when I package the program into a JAR, the JAR will not execute. My method of packaging is simply to use File -> Export -> JAR.
    Note: if I comment out the two lines related to the Icon Image, then the JAR executes as expected (but without my custom image icon, of course).
    I am concerned that perhaps the resource folder containing the image is not being included in the JAR. Is there an easy way to check this? Or is there something else I am doing wrong?
    Thanks!

    Thanks for the information atmguy. After checking the jar contents, I found that my resource files (the "red_circle.png" in this case) were not being packaged into the jar. It looks like the reason for this was that I had just added the directory to my project "src" directory by hand, rather than importing the files with Eclipse. Thus, when I packaged the jar using Eclipse, it was unaware of the resource files and therefore did not include them in the jar.
    Also, I found that in Windows a handy way of quickly viewing jar files is to rename the jar as a .zip, and then just explore the zip file. (As mentioned here: http://en.kioskea.net/faq/sujet-556-to-see-the-content-of-a-jar-file).
    The jar now executes as expected. Thanks!

  • How to set image icon to JFrame

    Hi all,
    how to set image icon in the title bar of JFrame
    Thank for your help in advance

    thanks
    I have done as:
    Image image;
    image=getToolkit().getImage("database_yellow.png");
    if(image==null)System.out.println("fault
    n("fault image");
    this.setIconImage(image);
    but when I run my application, I can't see the database_yellow.png in the
    title barHm, strange ... from the code snippet you just posted I can't find the error.
    This may seem weird, but try to load a small .gif image instead ...
    Are you sure the Image is not equal to null?
    kind regards,
    Jos

  • Is it possible to add a button with image on the title bar(IDR)?

    I look through all the buttons in the example, All of them does not with an image on them.
    Is it posslbe to put a image on the title bar?
    Best regards?
    Blake Le

    hi, Julia,
    Sorry for the misleading. I want to add a button below the IDR area. And for common button it's OK.
    Now the situation changed , i need to add an icon to a button , to make the user interface more beautiful.
    Is that possible?
    Best regards,
    Thanks very much for your help.
    Blake Le

  • Fireaction event on click of lov image icon

    hi tapash,
    i need to set fireaction event on click of lov image icon , i have tried using
    pagecontext.isLovevent() but this is fired only at the lov value on click back to the main page not immediatly after the image icon is clicked. so please suggest me some solution on this.
    with thanks
    prabhakara.p

    hi sumit,,
    actually the funtionality is i need to pass one value to lov query in controller.The query results are being displayed on the lov page after i set that value in where clause. Since i need to set that value in where cluase before the query execution(lov page display) thats why i need to set fireaction on image onclick of icon.
    column1 column2
    lov 1 val1
    lov 2 val2
    for example if i click lov2 immediatly i need to pass val2 in the where clause before the query execution...
    i hope u got this and thanks in advance please reply soon and i willl be greatfull to u since its very urgent...
    prabhakarn.p
    Message was edited by:
    user630121

  • Image Icon not showing in "get info" for OS 10.9.4

         I  now have PS CC 2014 and the image icons are showing the "generic" .jpg and .psd files in the "get info" finder window, but on my desktop the images are showing their
         proper image icon.
         I was previously using PS CS 5 and the icons are showing up in the "get info" window, but with PS CC 2014 these icons are showing up as generic.
         To be clear the images I saved using PS CS 5 are showing the icons vs. the images I saved in CC 2014 where the icons are not showing in the "get info" window.
         I've compared preference settings with PS 2014 and PS 5 but their basically about the same.
         I'm including 2 images so you can see what I'm explaining. IMG_1627 is a PS CC2014 created image and Arturo is a PS 5 image.
         I did read about other PS users having similar issues but it looked to be unresolved.
         You may think what's the big deal, but I use these image icons to label my folders. A "trick" I've doing for over decade which helps keep my folders visually on track for me.
         Is anyone out there able to solve this issue??  

    I do on occasion get jpgs and pngs that won't render a thumbnail or preview in MacOS.  I have 10.9.5
    I don't have this problem, although I just have CC and CC 2014 on my Macbook.
    I would open those up in Preview.app and try a Save As... and I would get the thumbnail and thumbnail preview back.
    Not really the best idea,but you can see if it helps.
    These  are my file saving options, perhaps there is something there you can try.
    Gene

  • Unable to View the Images in OBIEE Title view

    Hi All,
    I am trying to add a image in the title view of Answers interface.
    I placed my image in jpeg format in the following 2 paths.
    C:\OracleBI\oc4j_bi\j2ee\home\applications\analytics\analytics\res\s_oracle10\images
    and
    C:\OracleBI\web\app\res\s_oracle10\images
    I restarted oc4j , biserver & presentation server..
    But I am not able to view the image. It shows a Red X botton.
    I checked my Internet explorer settingg. Everything is fine.
    Please guide me.
    Regards
    Mehaboob Jaan

    Ok here is my instanceconfig.xml file and i dont see anything called style.
    <?xml version="1.0" encoding="utf-8"?>
    <WebConfig>
    <ServerInstance>
    <DSN>AnalyticsWeb</DSN>
    <JavaHome>C:\Program Files\Java\jdk1.5.0_16</JavaHome>
    <CatalogPath>C:/OracleBIData/web/catalog/Arj</CatalogPath>
    <Alerts>
    <ScheduleServer>SSALWXPP072</ScheduleServer>
    </Alerts>
    <CredentialStore>
    <CredentialStorage type="file" path="C:\OracleBIData\web\config\credentialstore.xml" passphrase="secret"/>
    <!-- other settings ... -->
    </CredentialStore>
    <AdvancedReporting>
    <ReportingEngine>XmlP</ReportingEngine>
    <Volume>XmlP</Volume>
    <ServerURL>http://SSALWXPP072:9704/xmlpserver/services/XMLPService</ServerURL>
    <WebURL>http://SSALWXPP072:9704/xmlpserver</WebURL>
    <AdminURL>http://SSALWXPP072:9704/xmlpserver/servlet/admin</AdminURL>
    <AdminCredentialAlias>bipublisheradmin</AdminCredentialAlias>
    </AdvancedReporting>
    <!-- To configure a limited set of languages to be available to users uncomment the <AllowedLanguages> tag below and choose a subset set of language tags from the list. Values must be comma separated. -->
    <!-- <AllowedLanguages>cs,da,de,en,es,fi,it,ja,ko,nl,no,pt,pt-br,sv,zh,zh-tw</AllowedLanguages> -->
    <!-- To configure a limited set of locales to be available to users uncomment the <AllowedLocales> tag below and choose a subset set of locale tags from the list. Values must be comma separated. -->
    <!-- <AllowedLocales>cs-cz,da-dk,de-at,de-ch,de-de,de-li,de-lu,en-au,en-ca,en-cb,en-gb,en-hk,en-ie,en-jm,en-nz,en-ph,en-us,en-za,en-zw,es-ar,es-bo,es-cl,es-co,es-cr,es-do,es-ec,es-es,es-gt,es-hn,es-mx,es-ni,es-pa,es-pe,es-pr,es-py,es-sv,es-uy,es-ve,fi-fi,fr-be,fr-ca,fr-ch,fr-fr,fr-lu,fr-mc,it-ch,it-it,ja-jp,ko-kr,nl-be,nl-nl,no-no,pt-br,pt-pt,sv-fi,sv-se,zh-cn,zh-mo,zh-sg,zh-tw</AllowedLocales> -->
    <!-- <Disconnected><ArchiveIbots>true</ArchiveIbots><DisconnectedDir>disconnected</DisconnectedDir></Disconnected> -->
    </ServerInstance>
    </WebConfig>
    Please let me know how to add this and where to add.
    Thanks
    Jaan

  • Help needed in Drag and Drop and  resizing of image icons

    Hi all,
    I'm doing a project on Drag and Drop and resizing of image icons.
    There is one DragContainer in which i have loaded the image icons and i want to drop these image icons on to the DropContainer.
    After Dropping these icons on to the DropContainer i need to resize them.
    I have used the Rectangle object in resizing.
    The problem now i'm facing is when i drag, drop and resize an image icon and when i try to drag, drop a second image icon the first image icon gets erased.
    can any one help me in fixing this error.
    if u want i can provide the source code.
    thanks in advance
    murali

    the major restrictions in its implemented only in
    jdk1.1.Why!

  • How do you make an array of image icons and then call them?

    How do you make an array of image icons and then call them, i have searched all over the internet for making an array of icons, but i have
    found nothing. Below is my attempt at making an array of icons, but i cant seem to make it work. Basically, i want the image to match the value of the roll of the dice (rollVal)
    Any help would be greatly appreciated, some code or link to tuturial, ect.
    /** DiceRoller.java
    * Roll, print, Gui
    import javax.swing.*;
    public class DiceRoller extends JFrame
         private ImageIcon[] image  ;
         public String[] images = { "empty", "dice1.jpg",
                   "dice2.jpg", "dice3.jpg", "dice4.jpg",
                   "dice5.jpg", "dice6.jpg" };
         public Dice die;
         private int rollVal;
         public int rollNum;
         private JLabel j1;
         public DiceRoller(){
              j1= new JLabel("");
           die =new Dice();
           int rollVal;
           rollVal = die.roll();     
           image = new  ImageIcon[images.length];
         for(int i = 0; i < images.length; i++){
          image[i] = new ImageIcon(images);
         if (image!=null){
              j1.setIcon(image[rollVal]);
         System.out.println("Roll = "+die.roll());

    Demo:
    import java.awt.*;
    import java.net.*;
    import javax.swing.*;
    public class IconExample {
        public static void main(String[] args) {
            EventQueue.invokeLater(new Runnable(){
                public void run() {
                    launch();
        static void launch() {
            try {
                Icon[] icons = new Icon[6];
                for(int i=0; i<icons.length; ++i) {
                    String url = "http://www.eureka-puzzle.be/cast/images/dice" + (i + 1) + ".jpg";
                    icons[i] = new ImageIcon(new URL(url));
                display(icons);
            } catch (MalformedURLException e) {
                throw new RuntimeException(e);
        static void display(Icon[] icons) {
            JPanel cp = new JPanel();
            for(Icon icon : icons) {
                cp.add(new JLabel(icon));
            JFrame f = new JFrame();
            f.setContentPane(cp);
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.pack();
            f.setLocationRelativeTo(null);
            f.setVisible(true);
    }

  • Macbook Pro Retina 15" flashing image/icon of world on screen at startup

    My Macbook Pro (retina 15"), flashed an image/icon of the world when started up, and it had to be restarted before starting up properly. What's the reason for this? Is this an issue?

    Search on globe at startup.
    When I did up came some answers from way back in 2006.
    It said to go to preferences startup & select the start up.  I tried that & then restarted & while it seemed to take awhile then the rest has been faster.
    It was saying something about losing where to find the start up so it was hunting until it found it.  Something like that.
    I'm on a 2012 13" MacBookPro running Mavericks.
    Before this I had noticed it flashing back & forth between a gray screen & Mavericks screen on boot up (I was back & forth while booting & came back to see that. knew it wasn't good so shut down. Waited a few & then started up. It worked.)
    It was funny since I had been wanting to go to Apple store & had talked about going w sister in law. That morning they said they were going in because hers wasn't working at all. So then I booted up & had that happen.
    So I called & made a Genius bar appt. They checked & didn't find anything, but I had been getting the globe on bootup which kind of concerned me. Also its been rather slow booting & shutting down.

  • Not showing image in basic copy gif image icon and place on html page

    Trying to do a basic copy gif image icon and place it on a basic html page.
    The image shows up in my local page and shows on remote side but when I go to view in browser it does not show as a image. It shows the border but no image.
    The directions were (working with windows xp and IE8)
    Download the image to your C:\temp folder.
    4. Copy the gif file from your C:\temp folder and paste it in the same folder where your .html or .asp file is.
    I copied the image with right click save as in many different areas of computer. I even put on desktop.
    I add image and it shows on the site I am working in but when putting to remote side it does not view as an image on the browser.
    I have cleared cashe as well as pressed cntrl/refresh and still nothing.
    Other images work and show.
    on-line-vacations.com
    Thanks!

    Basic assumptions:
    You have Defined a site.
    All files reside within the defined site (including image files)
    All files use the appropriate file extensions, for example, image.gif
    You have saved and uploaded all site files to your server.
    You are EXACTLY naming the source image (no errant capital letters) in the link.
    If your other images are linking properly and showing, delete this image and insert it again (or re-link it to the image file within your site structure).
    Z

  • Preview Image icon in Finder

    Hi everyone!
    I couldnt exactly find a help topic for this...
    I just want to know why the image icon in the finder windows doesnt change when you alter the image in preview? Say I cropped an image in preview or rotated it, the preview icon of the image in finder is the original but when you click to open it, its the altered image.
    Should I have clicked on something in the preferences? Or is it really like that.
    Because in my desktop, the image does change when it got restarted but not in the finder window.
    Any reply would be appreciated....thanks!

    I have the same problem. I edit my pictures with HP Photosmart Studio. I might crop it, rotate or change it to black and white but the icon will stay the same. When I open it in Preview it is fine. I also have Windows XP installed through parallels, the strange thing is when I go to XP windows explorer it shows the correct Icon and correct image for the picture.
    It really buggin me please help.
    Also when I try to upload a picture I can not switch it to thumbnail like in Windows to see the picture I am attaching. Any ideas???

  • How do I make image icons in finder window previews of the image?

    The image icons in my finder window are just generic jpeg icons (they are set to open automatically in Preview). How do I make them previews of the images themselves? When I "get info" on the icon, there is a very nice preview of the image - I would like to see the same quality preview in the icons themselves.
    Thank you very much for your help.
    Sam
    Powerbook   Mac OS X (10.4.6)  

    Hi Sam,
    From your Finder "View" menu (without a Finder window open) >> "Show view options" >> do you have "show icon preview" check marked? And with the Finder window open "show icons" and "show preview icons" checkmarked?
    EDIT: I may have misunderstood your question. If you're talking about the small file icons, not in the preview frame if you have PhotoShop it should do it with a save as PS file. Otherwise you may be able to paste the image but I'm not sure.
    -mj
    [email protected]
    Message was edited by: macjack

  • Which Listener I should use if I drag and Drop an image/icon into a JPanel?

    Dar Friends:
    Happy new year.
    I try to drag and Drop an image/icon into a JPanel, and hope I can immediately detect it after DND,
    Which Listener I should use in this JPanel if I drag and Drop an image/icon into a JPanel??
    Thanks

    Thank camickr .
    I can dnd an image into a JPanel called JPanelOld already, I hope to use another JPanel or JTree to listen to any Dropped Image in JPanelOld later on so I can take some action in another JPanel or JTree.
    so what kind of Listener I should use for my purpose??
    where to add this Listeners??
    Happy New Year.

Maybe you are looking for