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();

Similar Messages

  • Photoshop CC crop image size & resolution dialog box

    In previous versions of Photoshop the "R" button displays the Crop Image Size & Resolution dialog box.  Is this feature completely gone is CC? I can't find anything the even references this dialog box.  Anyone out there have this issue?

    In photoshop cc 2014, the size and resolution boxes will actually show on the tool options bar instead of a separate dialog window, by choosing W x H x Resolution from the drop-down menu.
    http://helpx.adobe.com/photoshop/using/crop-straighten-photos.html

  • How to simply display resulting text in a dialog Box

    Is there a way to simply display resulting text in a dialog Box - not a text edit document?
    Doug_

    Thanks that's very helpful
    What I am trying to to is to create a workflow that opens mail and displays iCal TO DO's that I have created throughout the day tagged with the word MAIL so they can be filtered.
    At the moment the ACTIONS are:
    Launch Mail
    Get New Mail
    Find TO DOs in iCal (Who's SUMMERY includes MAIL)
    I get iCal To Do's as a result
    But then...I can find no options to display the iCal Events that result.
    Putting in the Applescript you posted displays a blank dialog box. This tells me that there is no text in the result.
    Yet if I put a SPEAK TEXT in after find TO DOs it dutifully speaks my filtered TO DO's
    I thought I might just try a NEW MAIL MESSAGE action.
    This works great in the workflow. The content of the new mail is the filtered TO DOs.
    But if I save it as an application (the form I need it in), mail simply opens blank when it reached that part of the work flow.
    What would you recommend?
    Thank again for your help,
    Doug_
    Message was edited by: Douglas Suiter
    Message was edited by: Douglas Suiter
    Message was edited by: Douglas Suiter

  • Adding images in custom dialog box

    Hi!
    Do  you know if it's possibile to insert an image in a custom dialog box? I mean during the custom dialog box design (during the .dre file creation).
    Thanks to all!

    Hi Stemens,
    I'm hesitant to answer your questions anymore because somebody always comes behind and shows everybody how much I don't know   Anyway, I do not know of a way. I remember that there have been other developers discussing this and I think everybody just gave up. I have never seen an image in a dialog box, so that tends to indicate to me that no one has found a way.
    Russ

  • How to display a screen as Popup Dialog box in Module Pool

    Hi All,
    I have a requirement to display a popup dialoge box into module pool.
    i need to display a screen as a popup on the current screen on a button click.I have developed a screen and in atribute tab i have defined the screen type as modal dialog box but  it is displaying previous screen screen is hide i want to display on the same screen as a popup.
    Thanks
    Narendra

    Hi Narendra,
    Try to trigger the popup once it is done with the previous action might be anything.
    i have shown one sample code where after i click on save button when the data is saved successfully
    after that it has to trigger me a popup asking for conformation for the next action.
    A small piece of code
    INSERT INTO ZORMD1 VALUES WA_ZORMD1.
        IF SY-SUBRC = 0.
          G_LOCAL1 = 0.
          MESSAGE S000.  " Data saved successfully and immediately call the popup
    CALL FUNCTION 'POPUP_TO_CONFIRM_STEP'
            EXPORTING
      DEFAULTOPTION  = 'Y'
    TEXTLINE1 = 'SUCCESSFULLY SAVED'
              TITEL = 'POPUP FOR conformation'
             START_COLUMN         = 25
             START_ROW            = 10
            CANCEL_DISPLAY       = 'X'
           IMPORTING
    ANSWER  = G_PRINT
    IF G_PRINT = 'J'.
    PERFORM PRINT_OUT.
    ENDIF.
    Do the modification according to your requirement.
    Cheers!!
    VEnk@

  • Displaying Japaneese character in SaveAs Dialog box

    Hi,
    I have a problem with displaying japanese file name in 'save as' dialog box.
    I have a page that lets user to download a file. On downloading a file , the 'save as' dialog box opens up with the file name. The file name is passed to the dialog box by setting the content-disposition as given below in the jsp
    response.setHeader("Content-Disposition", "attachment;filename=" + strFileName);
    The file name string is encoded in japanese EUC-JP charset. The page content-type is also set to EUC-JP. The browser's
    encoding charset is set to EUC-JP. And also I have tried with different Charcter Encodings which Support Japanese like SJIS , Cp943C,UniCodeBig ,UniCodeLittle.
    But nothing worked out.But english FileNames are coming correctly in the FileSave Window
    but... when the dialog box opens up, the file name turns out to be junk even though the file name passed to it is a correct EUC-JP encoded string.
    I guess this is becos the 'save as' dialog box takes some default browser values...
    Here is the Code Used
    byte[] barrFile = (byte[])
    lhashToViewBean.get("ATTACHMENT_FILE");
    byte[] bFileName=lsFileName.getBytes();
    String lsNewFileName=new
    String(bFileName,"JISAutoDetect");
    goWebUtility.writeDebug("NEW2 SAIKRIS FILE NAME
    AFTER ENCODING in FILE DOWNLOAD ",">>>>>"+lsNewFileName.trim()+"<<<<<");
    res.setContentType ("application/octet-stream
    ;charset=JISAutoDetect");
    res.setContentLength ((int )barrFile.length) ;
    res.setHeader
    res.setLocale(Locale.JAPANESE);
    BufferedOutputStream buffFileStream = new
    BufferedOutputStream (res.getOutputStream ());
    buffFileStream.write (barrFile) ;
    buffFileStream.flush ();
    buffFileStream.close ();
    Pls, can someone suggest a solution to this problem.
    Thanks.
    Rgds
    Yoonus

    Hi,
    Iam the author of the post.
    I have got the solution.
    After getting the file name from Database the Japaneese String(lsFileName) is encoded using "UTF8" encoding method of java.net.URLEncoder.encode(String lsFileName,String encType) of JDK 1.4
    U can get the JDK1.4 URLEncoder class from
    http://wwws.sun.com/software/java2/download.html . Here you get the entire code for JDK1.4
    Hope this helps.I get all the duke Dollars for myself :-)
    yoonus

  • Displaying Multiple Sentences in Confirmation Dialog Box

    Hi Experts,
    Can anybody please tell me how to display three or multiple separate sentences in a Confirmation
    Dialog box. I am able to diaplay two sentences in a single line but the dialog box is getting stretched a
    lot. So i want to diaply them in separate sentences onr below the other.
    Thanks a lot.

    Hi shrini...
                   you want to number of line display in one dialog box ..
                  you have to declare one Strinh like thiss as below..
    have to create one event method as OK...which is visible in eventhandler code as
    findInEventHandlers("OK");
    create one method in component aas showBox....
    public void showBox( )
        //@@begin showBox()
         String   dialogText="welocme to""\n""India""\n".........................
          IWDEventHandlerInfo info=wdControllerAPI.getControllerInfo().findInEventHandlers("OK");
         IWDConfirmationDialog win=wdComponentAPI.getWindowManager().createConfirmationWindow(dialogText,info,"OKK");
      win.open();();
    thanks
    jati

  • How to displays the standard open file dialog box in Oracle Apps Server

    Hi,
    I am having a form, where i am opening a file and putting that file content in a text box.
    This is my code written in WHEN-BUTTON-PRESSED trigger:
    declare
    in_file Text_IO.File_Type;
    linebuf VARCHAR2(8000);
    filename VARCHAR2(30);
    BEGIN
    filename:=GET_FILE_NAME('d:\Rajesh\Practice', File_Filter=>'Text Files (*.txt)|*.txt|',select_file=>false);
    in_file := Text_IO.Fopen(filename, 'r');
    LOOP
    Text_IO.Get_Line(in_file, linebuf);
    :text_item5:=substr(:text_item5||linebuf||chr(10),1,5000);
    END LOOP;
    EXCEPTION
    WHEN no_data_found THEN
    Text_IO.Put_Line('Closing the file...');
    Text_IO.Fclose(in_file);
    END;
    I have posted this in ORacle Apps Server.Where i was not able to get the Open Dialoq Box.It is giving an error as
    "FRM-40735:WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-302000.".
    I think the GET_FILE_NAME function is not supported in the Apps Server.
    Is there any alternative solution for getting the OPEN DIALOG WINDOW in Oracle Apps Server?
    Pls let me know.

    Hi!
    waldemar.hersacher wrote:
    "It seems that the VIs called by the clients are running in the user interface thread.
    A call to the file dialog box will call a modal system dialog. So LV can't go on executing VIs in the user interface thread."
    Are you sure? I think, that File Dialog, called by LabVIEW File Dialog from Advanced File Functions Palette doesn't blocking any cycles in subVI, which running in UI Thread. Look in my old example (that was prepared for other topic, but may be good for this topic too).
    2 linus:
    I think, you must a little bit reorganize you application for to do this. You must put your File Dialog into separated cycle. This cycle, of course, will be blocked when File Dialog appear on the screen. But other cy
    cle, which responsible for visualization will run continuosly at the same time...
    Attachments:
    no_block_with_file_open_dialog.zip ‏42 KB

  • I cant' print using firefox. print preview won't display, won't print, printing dialog box won't display, etc

    Seems like since I updated to firefox 5 I can't print web pages, print preview won't work. I click on the print option under file and nothing displays or prints.

    Try the Firefox SafeMode and see if you can initiate printing from within Firefox. <br />
    ''A troubleshooting mode, which disables most Add-ons.'' <br />
    ''(If you're not using it, switch to the Default Theme.)''
    # You can open the Firefox 4/5/6/7 SafeMode by holding the '''Shft''' key when you use the Firefox desktop or Start menu shortcut.
    # Or use the Help menu item, click on '''Restart with Add-ons Disabled...''' while Firefox is running. <br />
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before using the Firefox shortcut (without the Shft key) to open it again.''
    If it is good in the Firefox SafeMode, your problem is probably caused by an extension, and you need to figure out which one. <br />
    http://support.mozilla.com/en-US/kb/troubleshooting+extensions+and+themes

  • In Indesign cc the preview of the selected image is not showing in the place dialog box how to enable that?

    I can't able to see the preview of the selected image in place dialog box of indesign cc but it working in indesign cs6

    Post Author: Argan
    CA Forum: .NET
    A couple things can cause this.
    Right click on the red x to find out the name of the png file.  Search the web server for that png and make sure that the asp worker has access to it.
    The other is a image handler issue.  Search the kbase for Red X NET 2005 and you will find a kbase or two that addresses this.

  • Photoshop cc print dialog box image dark

    I'm on a MacBook Pro running Mt. Lion with PS CC, an Eizo monitor, printing with an Epson 3880, calibrated and profiled with a ColorMunki. When I preview an image to print, the image is darker in preview, and the color is much different than the actual image. When I print with the proper paper profile, (photoshop manages color and the space is Adobe 1998) it prints looking like the preview image rather tha the one on the monitor. I also run Snow Leopard on a partition with CS6, and the above does not happen, everything works fine. A photog friend of mine with a similar setup is experiencing the same problem since upgrading to Mt. Loin. Another graphic designer friend is running Mavericks and is has the same problem. I have another photog friend in Nashville who is having THE SAME PROBLEM!! Does anyone know what the heck is going on? I'm the only one who kept Snow Leopard so I can still print, which I do on almost a daily basis. What broke what? Is it a bug with PS CC, or did something in MT. Lion break? This is very frustrating for all of us and I find it totally unacceptable.
    If anyone has a clue and can help, we would be eternally greatfull.
    Thanks,
    Greg Nikas

    Thanks for the tip on inserting photos. I'm new here, won't post a link in the future.
    I'll try to simplify my issue;
    1. In CS6 in Snow Leopard, the original/source image looks just like the image in the print dialog box and prints beautifuly. See images below.
    Original image.
    Print dialog box image.
    2. In PS CC and CS6 in Mt. Lion, the original/source image is redder and more saturated than the image in the print dialog box, but the print looks like the the image in the print dialog box. The image in the print dialog box looks like the original/source image in CS6 in Snow Leopard! See images below.
    Original image.
    Print dialog box image.
    3. The issue seems to be with how the original/source image in PS CC and CS6 renders in Mt. Lion. As I said in my intial post, I have three friends who are having the same problem and none of us can figure it out, and I'm the only one who kept Snow Leopard.
    4. I'm on a MacBook Pro running Snow Leopard and Mt. Lion on a partitioned disk.
    5. I have an Eizo CG222W monitor, which is calibrated with an x-rite ColorMunki. Each OS has it's own calibration profile.
    6. I print on an Epson 3880 using the latest driver, and all papers have thier own profile and look the same when printed from either OS. 
    7. All settings in PS CC, CS6 and Bridge are identical in both OS's.
    I hope this is stated more clearly.
    Greg

  • How to display an image in Cocoa-Applescript?

    I made my script, but for a welcome message there is no image. How do I display one embeded in a dialog box with text underneath? I'm making this with ApplescriptEditor, not Xcode. Let's say this image was called "MCL.PNG". Thanks in advance.

    A Cocoa-AppleScript uses the Cocoa frameworks, so that is what I thought you were talking about.  A regular AppleScript display dialog can only use an icon, and it is positioned on the left without any text (unless the text is a part of the icon).  If you have an icon file, you can use an alias or file reference using the with icon parameter for the command (see the Standard Additions scripting dictionary), for example:
    display dialog "testing" with icon file "path:to:your:icon"

  • Export presets now direct me to the "Browse For Folder" dialog box

    Suddenly Lightroom will not remember the name of the "export to" folder when I use my export presets in certain ways, even though the name of the "export to" folder appears in the "Export" dialog box. The prolem exists in Library and Develop modules. This is what's happening…
    IF I CLICK ON "FILE":
    1. And choose the "Export" option, LR displays the Export dialog box, from which I can select an user preset and export a JPG file to the proper folder, as intended. (OK) 
    2. And choose the "Export with Previous" option, LR exports the JPG file immediately to the proper folder. (OK) 
    3. And I choose the "Export with Preset option, LR displays the menu of Lightroom presets and user presets, but clicking on a user preset displays the "Browse for folder" dialog box from which I must manually browse to the export folder before a file can be exported. (NOT OK) 
    IF I RIGHT-CLICK ON THE IMAGE:
    LR displays a menu containing these options: Export, Export with Previous, the Lightroom presets, and my user presets. 
    4. If I then choose "Export," LR works properly---same as example 1 above. (OK) 
    5. If I then choose "Export with Previous," LR exports the JPG file immediately. (OK) 
    6. If I then choose one of my presets, LR does not work properly: it acts as it does in example 3 above. (NOT OK) 
    BACKGROUND:
    I have been using these presets for almost a year without fail---they're great! Two days ago I moved my Lightroom catalog to a new external drive. I also renamed the "export to" folder (that new name is stored in the "Export" dialog box). 
    I sure would appreciate hearing from anyone on this because it's driving me crazy. Thanks.

    SOLUTION FOUND:
    I created yet another folder for storing exported JPGs. Then for each export preset I used the "Browse For Folder" dialog to point that preset to that new folder. All presets now work as before. This fix was tolerable for the seven presets I have, but a large number of presets would have made it a real chore.

  • Multiple screens & Excel dialog box placement

    I'm using multiple screens with my 13" Retina Macbook Pro, and what is really annoying is that Excel places it's dialog boxes in a strange location where I cannot action them or move them.
    Does anyone have an idea on how to tell Excel to ignore the other displays and just show me the dialog boxes on the screen/desktop that has the application on? Going to fullscreen or moving the windows to any other displays didnt make any difference; dialog box remains the same

    On Wed, 14 Dec 2011 20:51:03 +0000, Nootrino wrote:
    >
    >
    >Recently upgraded to Office 2010 (32bit) /Windows 7.  Have hundreds of users that we support and so far most have upgraded.  Noticed with some users though - not all - just a small percentage, when they click SaveAs in Excel 2010, the application
    freezes.  On closer scrutiny we realized what was happening was the SaveAs dialog box was BEHIND the main Excel window.  The only way to restore it is to click on the tab from the Taskbar or minimize all the windows to FIND the SaveAs Dialog box. 
    Understandably this is causing these users stress and inconvenience.  It is very unproductive and a nuisance to say the least.  The only other variable here is that all these users have multiple monitors, usually 2-4.  But for some, this happens
    in their main monitor and/or the monitor that Excel is opened in and which has the focus.  Even more strange is that this does not occur to everyone, just a handful of users so far who have reported the issue.  We have also noted it happens with
    other
    >dialog boxes as well, not just the SaveAs so it seems generic in that sense.
    >
    >The other item with this issue is that it's not persistent.  Users have reported it's sporadic and comes and goes.
    >
    >Is this a bug? 
    >
    >Any feedback greatly appreciated.
    A search using Google reveals that this may be a problem with W7, and was first reported during beta testing!
    http://social.technet.microsoft.com/Forums/en/w7itprogeneral/thread/0bbefdc5-7f20-4b9f-8b24-1be76d6b7996
    and for a possible fix, but with some serious caveats:
    http://social.technet.microsoft.com/Forums/en-US/w7itproui/thread/7f4543cf-874d-4a39-bea5-34a824e4c0ce/
    Ron

  • No Insert Flash dialog box in PPT files with links to Word

    Presenter will not display the "Insert Flash (swf)" dialog box in PowerPoint presentations that have slides linked to a Word document.
    It works fine in PPT presentations that do not have the links to Word.
    I need to import a SWF in the presentation as well as have Word link to the slides in PPT.
    Is there a solution?

    The solution was to install a later version of Presenter. It works now.

Maybe you are looking for