Dialog not showing

Hey guys i really need urgent help.
I have a JDialog called dlg and what happen is i add a menu bar called menubar during runtime to this JDialog.
to add menubar during runtime i use
dlg.setJMenuBar(menubar);
dlg.setSize(dlg.getPreferredSize());
dlg.validate();
dlg.repaint();what happen is it only display the dialog with grey window only.it doesnt show up the contents.
i used dlg.pack() before but it still not working.
i believe the addition of the menu bar is working because i can see the grey window is changing height but it just dont want to display all the components.
do you know what could be the problem? and suggestion? code sample will be helpful.

oh sorry ... i get what you mean by using show () now .. but it is still not working ...
do you have any more suggestion??
i guess i should tell you this to, on some window my method work perfectly but in other window its not. so its not really consistent.
is it possible because theres a conflict or something? if it is then could you tell me what are the conflict that can cause this code is not working?
thank you

Similar Messages

  • Download file in struts - File save dialog not showing up

    Hi,
    The issue i have is - the file save dialog box which should be displayed on file download is not showing up.
    I have a DAO being called from the Action form SaveDocumentAction which extends DispatchAction and has a download(mapping, request, response,..) method. Below are relevant portions of my code.
    public void showDocument(DocumentTO Doc, HttpServletResponse response){
    //get filename etc
    response.setContentType("application/x-download");
    response.setHeader("Content-Disposition", "attachment; filename=myFile.txt");
    OutputStream out = response.getOutputStream();
    //code for writing from input file to out
    I shld be getting a File Save dialog after response.setHeader(), but I am not. Can anyone tell me where I am going wrong. I have printed SOPs and all print fine, even the file writing part.

    Put this code into a servlet rather than a JSP.
    JSP are for returning text based HTML pages. It adds extra carriage returns into the response that will corrupt the file, and prevent the dialog showing up.
    This code is much better off being in a servlet
    If you are using a FileInputStream, you should be using a ServletOutputStream rather than the JSP writer: response.getOutputStream()
    When dealing with file input in a JSP/Servlet you should use the methods of ServletContext. getRealPath() turns a website relative file into a real location on disk. getResourceAsStream() opens the file for you. getResourceAsStream() is more reliable as it will work even if the web app is deployed in a packed WAR.
    Cheers,
    evnafets

  • PSA Edit Dialog - Not showing all the columns

    Hi All,
    I need to edit the transaction data for 2LIS_13_VDITM in PSA. when I go to display the PSA data it shows few selected fields in the initial display not all coming in the data source.
    In Order to get that field in Data Display,  I change the display variant and bring the field in the data display .
    Now, When I try to edit that record the the Edit Dialog Pop Up  does not show me all the columns which are there in the Data Display. I checked in the display Selection Tab, the field list over there also does not contain this field.
    However, I am able to edit data for all other Data Sources.
    Has someone ever faced this kind of strange thing.  We were on support pack 18 and migrated to BW 3.1 support pack 20. I was able to edit data in PSA for this data source earlier. Can it be a support Pack Problem ?
    Requesting for your valuable suggestions on this!!!
    Regards
    Deepak

    Hi All,
    The below problem occured due to Support Pack upgrade.
    If you are upgrading Basis Support pack from 47 to 48, you might face this kind of problem.
    OSS Note Number : 821558 proved to be quite handy.
    Regards
    Deepak

  • Swing Dialog not Showing Content

    Hello,
    I am currently developing code for a complex GUI system and I am experiencing a big problem
    when I try to popup JDialogs. I have a JProgressBar inside a JDialog that pops up when our
    system is doing work. The JDialog pops up but I cannot see the JProgressBar inside the dialog.
    (I also tried to just add a JLabel to the dialog but that doesnt show up either.) When I run my progress
    dialog "stand-alone" I can see the progress bar fine.
    The code for my progress dialog even creates its own thread when it runs so I am pretty sure that
    its not blocking inside my own code.
    This leads me to believe that somewhere in our GUI code we have somehow "blocked" some critical
    AWT (or Swing?) thread and it cannot update the contents of the JDialog.
    Does anyone have an idea as to what could be going on here or how I might find out? I have tried using
    JProbe and Optimizeit Thread profiling tools but they have not really been much help.
    Thanks!
    M.
    import java.awt.BorderLayout;
    import java.awt.Component;
    import java.awt.Dialog;
    import java.awt.Dimension;
    import java.awt.Frame;
    import java.awt.Point;
    import javax.swing.JDialog;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JProgressBar;
    import javax.swing.SwingConstants;
    public class ProgressAnimationDialog implements Runnable {
         private static final Dimension DIALOGSIZE = new Dimension(200,100);
         private JDialog theDialog;
         private JProgressBar progressBar = new JProgressBar();
         private String string = null;
         private Component owner = null;
         private boolean plainDialog = false;
         public ProgressAnimationDialog(Frame owner, String title) {
              theDialog = new JDialog(owner,true);
              theDialog.setTitle(title);
              this.owner = owner;
              init();
         public ProgressAnimationDialog(Dialog owner, String title) {
              theDialog = new JDialog(owner,true);
              theDialog.setTitle(title);
              this.owner = owner;
              init();
         public ProgressAnimationDialog(Frame owner, String title, String message) {
              theDialog = new JDialog(owner,true);
              theDialog.setTitle(title);
              string = message;
              this.owner = owner;
              init();
         public ProgressAnimationDialog(Dialog owner, String title, String message) {
              theDialog = new JDialog(owner,true);
              theDialog.setTitle(title);
              string = message;
              this.owner = owner;
              init();
         public ProgressAnimationDialog(Frame owner, String title, String message, boolean usePlainDialog) {
              theDialog = new JDialog(owner,true);
              theDialog.setTitle(title);
              string = message;
              this.owner = owner;
              plainDialog = usePlainDialog;
              init();
         public ProgressAnimationDialog(Dialog owner, String title, String message, boolean usePlainDialog) {
              theDialog = new JDialog(owner,true);
              theDialog.setTitle(title);
              string = message;
              this.owner = owner;
              plainDialog = usePlainDialog;
              init();
         private void init() {
              theDialog.setSize(DIALOGSIZE);
              theDialog.setResizable(false);          
              theDialog.getContentPane().setLayout(new BorderLayout());
              if (!plainDialog) {
                   theDialog.getContentPane().add(progressBar,BorderLayout.CENTER);
                   progressBar.setIndeterminate(true);
                   if (string != null) {
                        progressBar.setStringPainted(true);
                        progressBar.setString(string);
              } else {
                   JLabel label = new JLabel("loading region....",SwingConstants.CENTER);               
                   theDialog.getContentPane().add(label,BorderLayout.CENTER);
         public void start() {
              Thread t = new Thread(this);
              t.start();
         public void run() {
              Point p0 = owner.getLocation();
              Point p1 = new Point();
              p1.setLocation(p0.getX()+owner.getWidth()/2.0,p0.getY()+owner.getHeight()/2.0);
              Point p2 = GUIUtilities.getMidPoint(p1,theDialog);
              theDialog.setLocation(p2);          
              theDialog.show();
         public void stop() {
              theDialog.dispose();
         public static void main(String[] args) {
              JFrame frame = new JFrame("Test ProgressAnimationDialog");
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              frame.setSize(600,400);
              frame.setVisible(true);
              ProgressAnimationDialog pad =
                   new ProgressAnimationDialog(frame,"Please Wait","Loading Region",true);
              pad.start();
              try {
                   Thread.sleep(5000);
              } catch (InterruptedException e) {
                   e.printStackTrace();
              pad.stop();
    }

    Hi Michelle!
    I tried out your code: besides the GUIUtilities class, whose reference I commented out, the program ran perfectly. I got a JProgressBar, with the text in the middle, and the indeterminate bar floating across...
    What version of Java are you using?
    regards,
    lutha

  • Javax.swing.ProgressMonitor-dialog not showing properly

    Hi @all,
    I've got a little prob using ProgressMonitor. I'm coding an Applet which loads some images. Since this task may take a while, I'm trying to use ProgressMonitor to show a dialog window with the corresponding progressbar to indicate how much work's done already.
    My code looks like this:
    // Image[] images has been filled before.
    // mt is a MediaTracker which surveys the loading.
    ProgressMonitor pm = new ProgressMonitor(
      null,
      "Loading images",
      0,
      images.length - 1
    for (int i = 0; i < images.length; i++) {
      pm.setProgress(i);
      pm.setNote(images[ i ].toString());
      // actual image loaded?
      while (!mt.checkID(i, true)) { 
        // if not wait:
        Thread.sleep(10); 
    if (mt.checkAll() && !pm.isCanceled() && !mt.isErrorAny()) {
      pm.close();
    // everything successfully loadedThe loading of the images works fine. My only prob is with the ProgressMonitor which starts showing after the default time (might be one second) - but the frame it shows is corrupt. You can see the outlines of it, but none of the contents is displayed - not to talk of the progressbar. Simply nothing.
    Did anyone encounter this prob as well and has some ideas what's wrong? Any help would be appreciated.
    Cheers,
    kelysar

    Hi.
    Solved this one as can be found in the Swing forum at http://forum.java.sun.com/thread.jsp?forum=57&thread=321045
    Cheers,
    kelysar

  • Why does the search dialog not show up for inputListOfValues?

    I am using JDEVADF_11.1.1.5.0_GENERIC_110409.0025.6013
    I have an LOV defined that works correctly in the Application Module Tester but does not appear to work correctly within a column of a table.
    I have defined the inputListOfValues as follows within a column of a table
    <af:inputListOfValues id="valueOneProductIntegrationIdId"
    searchDesc="Search Product"
    popupTitle="Search and Select: Product"
    model="#{row.bindings.ValueOneProductIntegrationId.listOfValuesModel}"
    simple="true">
    The control shows up with the search icon in the appropriate column of the table when I add a new row, but when I click on the the search icon, it does not bring up the Search and Select panel. It looks like it is trying to do something, but it is just ends up redrawing table.
    Any clue about how I might figure out what is going on here or what I am missing?
    Thanks, -Klaus

    try this and see what causes this issue..edit Project Properties>Run/Debug/Profile>Edit>Launch Settings
    set this param for Java Options and run
    -Djbo.debugoutput=console

  • Lightswitch - Person Picker dialog not showing name, instead shows person id sometimes

    I have a simple add user screen with Email, o365username, UserListProp and name fields. I am grabing Email and o365username  from UserListProp change event. UserListProp is the Screen property from UserInformationList datasource. And i have unchecked the
    "Is Searchable" property of the user information list for my purpose.
    So here is the problem, When i click "+" sign to grab user from the UserListProp dialog, Sometimes it shows personid and sometimes the name of the user.
    Say, for me it's, Nirav Maisuriya or [email protected]
    Please help.
    I do't know if it's a known issue or lightswitch bug or some error or the network traffic.
    Please guide me through. Need reply from Lightswitch Team if possible.
    Thanks,
    Nirav

    Hi,
    You could try to use add or edit dialog to achieve this, this is pretty simple to do this with add and edit screen.
    You could check your operation steps following blog below:
    http://blogs.msdn.com/b/lightswitch/archive/2011/07/07/creating-a-custom-add-or-edit-dialog.aspx
    Besides, here is article for visual studio 2013 html client :
    http://blogs.msdn.com/b/bethmassi/archive/2013/11/04/beginning-lightswitch-in-vs-2013-part-3-screen-templates-which-one-do-i-choose.aspx
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Find and replace dialog not showing correct

    After updating to Keynote 5.1 the Find dialog - Simple as well as Advanced - only shows a little more than two centimeters vertically from the top leaving the Replace field unaccessible.
    Any one else seing this?
    How can I get it right?
    It looks - and works - alright in Pages 4.1.
    best

    Solved! It is the Danish localization that is the culprit.
    Replacing BGFindPanel.nib in da.lproj with BGFindPanel.nib from English.lproj the Find dialog displays correctly.
    And I can live with that the dialog is in English :-)
    best

  • ADF Popup Dialog Not Showing Working

    I'm using JDeveloper 10.1.3 and ADF. I have been unable to get a dialog popup working. When I click on a commandLink in the Originating page, it only refreshes the Originating page and does not open the destination page at all. It's happening in both FF and IE.
    Within the faces-config.xml I created a navigational rule with outcome that begins with dialog.
    Extracted sample from faces-config.xml:
    *<navigation-rule>*
    *<from-view-id>/Originate.jspx</from-view-id>*
    *<navigation-case>*
    *<from-outcome>dialog:dest</from-outcome>*
    *<to-view-id>/Destination.jspx</to-view-id>*
    *</navigation-case>*
    *</navigation-rule>*
    The commandLink action attribute begins with dialog: and useWindow attribute is true.
    Extracted sample from JSP document:
    *<af:commandLink text="Go to Destination" action="'dialog:dest'"*
    useWindow="true" windowHeight="250" windowWidth="300"
    partialSubmit="true" id="originate"/>
    Is there something I'm doing wrong? Any help would be greatly appreciated.
    Thanks.

    It seems like the dialog:popUp does not work if it is not nested within
    &lt;afh:html&gt;
    &lt;afh:body&gt;
    &lt;af:form&gt;
    &lt;af:commandLink action="dialog:popUp"/&gt;
    &lt;/af:form&gt;
    &lt;/afh:body&gt;
    &lt;/afh:html&gt;
    I currently have it this way
    &lt;html&gt;
    &lt;body&gt;
    &lt;h:form&gt;
    &lt;af:commandLink action="dialog:popUp"/&gt;
    &lt;/h:form&gt;
    &lt;/body&gt;
    &lt;/html&gt;
    P.S.
    The former way works but it messes up page layout. It seems not to notice DIVs and image positioning.
    Any clues as to why?
    Edited by: user2709995 on Dec 31, 2008 6:31 AM

  • Save As Dialog Not Showing when opening pdf from Outlook 2010

    Hi
    I have recently had to change the default documents folder on a windows 7 machine (Right Click Documents, properties,  include folder, set save location). Since this change, when opening an attached pdf document in outlook 2010 and viewing with adobe reader, if i click Save as from the file menu, no os dialog appears and therefore user cannot choose a place to save the document.
    As a work around the user can right click the attachment save the docment to a location, once opened, ther save as dialog is usable.
    I have uninstalled and re-installed reader to the laterst version, but with no luck.
    Any ideas?
    Jason Congerton

    This looks like a new behavior of Outlook 2010 and isn't specific to PDFs. You will need to "save as" the document. There is a thread at Microsoft forums about this with some possible workarounds:
    http://social.technet.microsoft.com/Forums/en-US/outlook/thread/927d678d-b55b-4732-93cb-f1 3ed1dacf96/

  • Save as dialog not showing files on a AFP share in CS2

    I have a user who is not able to see any files or folders on an AFP share (SFM on Windows 2003) when attempting to Save As. The files are visible in the finder, terminal, it is not a permissions issue, and I have trashed permissions. Any ideas? Are there hidden files on the share that need to be trashed?
    10.4.10, 2.66 Mac Pro, AD user
    Thanks!

    Open the Script Editor in the /Applications/AppleScript/ folder, and use this script to make all files visible.
    (22547)

  • Open/Save Dialog does not show new files?

    Say you are working on a logic file in a folder and you have
    a few audio and movie files in that folder, and you launch
    Logic and via the open/save dialog window you add a few
    files to your song and in that dialog window you can see
    all the files in that folder.
    Then, in the Finder you add a few more files and movies to
    that folder and again use the open/save dialog window to
    add more files BUT the new files you added since launching
    logic are NOT SHOWN in the dialog window ! ?
    What's the deal with that?
    Every other app can show files added since the launch of the
    application, why not Logic?
    PowerBook G4 1GHz   Mac OS X (10.3.9)  

    project manager
    um, yeah.
    Should not need the project manager simply to see new files added to a directory in a Open/Save dialog window since last opening the app.
    I did a scan, a extended scan, opened all the little turn down arrows of the
    full path to the directory I knew there to be the new files and yes, Logic
    shows them there in the "Project manager".
    BUT Logic still does not show the files in the Open/Save dialog windows.
    This is strange because even simple app like TextEdit can show
    new files in it's Open/Save dialog function windows without the need of
    a project manager.
    I have to quit and re-launch each time to see any new files?

  • Image is not showing up on Dialog.

    Hi Guys
    I am getting problem with Dialog. In my Dialog I have created the image field which accepts image from dam by Drag and drop. Whil Iam dropping the image it is showing up inside the Dialog properly and is showing up on the screen also But when I try to edit the image the current image got vanished inside the dialog. I don't understand why it is happening?
    while uploading
    The above image is not showing up while editing. Could you please help me where I am doing wrong?
    here is my dialog.xml
    <normalmode
    jcr:primaryType="cq:Widget"
    collapsed="{Boolean}false"
    collapsible="{Boolean}false"
    hidden="{Boolean}false"
    title="Picture Properties"
    xtype="dialogfieldset">
    <items jcr:primaryType="cq:WidgetCollection">
    <pictureurl
    jcr:primaryType="cq:Widget"
    allowUpload="{Boolean}true"
    autoUploadDelay="1"
    ddGroups="[media]"
    fieldLabel="Picture Link"
    fileNameParameter="./fileName"
    fileReferenceParameter="./fileReference"
    height="{Long}200"
    name="./file"
    requestSuffix="/image.img.png"
    rootpath="/etc/designs/aib/business/images"
    sizeLimit="100"
    uploadUrl="/tmp/upload_test/*"
    xtype="html5smartimage"/>
    <picturealttext
    jcr:primaryType="cq:Widget"
    fieldLabel="Picture Alt Text"
    name="./picturealttext"
    xtype="textfield"/>
    <picturetitletext
    jcr:primaryType="cq:Widget"
    fieldLabel="Picture Title Text"
    name="./picturetitletext"
    xtype="textfield"/>
    </items>
    </normalmode>
    Cheers
    Kirthi

    Hi Jitendra,
    It worked.Perfect. Thank you very much. I want to implement the same in my Custom widget which contains smartimage. But it is not showing up. Here is my Custom widget code for the smartfile but iam not getting Drag and drop jus it is showing up blank. Any idea how can I incorporate the smartfile in my Custom widget.
    // Picture URL
                            this.add(new CQ.Ext.form.Label( {
                                cls : "customwidget-label",
                                text : ""
                            this.bannerImageURL = new CQ.form.SmartFile( {
                                cls : "customwidget-1",
                                fieldLabel : "Picture Link: ",
                                editable:false,
                                allowBlank : false,
                                anchor: '75%',
                                maxLength : 100,
                                cropParameter :"./image/imageCrop",
                                ddGroups : "media",
                                fileNameParameter : "./image/fileName",
                                fileReferenceParameter : "./image/fileReference",
                                mapParameter :"./image/imageMap",
                                rotateParameter : "./image/imageRotate",
                                name : "./image/file",
                                requestSuffix : "/image.img.png",
                                sizeLimit : "100",
                                autoUploadDelay : "1",
                                listeners : {
                                    change : {
                                        scope : this,
                                        fn : this.updateHidden
                                    dialogclose : {
                                        scope : this,
                                        fn : this.updateHidden
                            this.add(this.bannerImageURL);
    Once again thanks for helping me to resolve the issue. The above is another requirement. Any ideas?
    Cheers
    Kirthi

  • Print Dialog Box for Addon is not showing in Terminal Server

    Dear All,
    I have created a addon for Automatic Sales Invoice printing that prints the crystal report directly to the printer bu opening a
    print dialog box for printer selection through SDK code.
    The Same addon works fine on the server with print dialog box being showing through SDK code.
    But while running on Terminal Server , print dialog box is not showing any printer though printers are redirected to that
    terminal server.I am not getting whether the problem is in my addon or in the terminal server printer settings.
    Please suggest as i need to know the reason urgently.
    Thanks
    Amit

    Hello Edward,
    Thanks for your reply .
    But the problem is that while running on normal server the print dialog box appear with the printer name in my addon for printer selection .
    But while using terminal server , the print dialog box is not getting any printer in the dialog box .That's the major concern for me
    is their any way to check that why the printers are not showing in print dialog box.
    Thanks ,
    Amit

  • BUG: "Save As" dialog is not showing

    sometimes i have the problem (since CC) that the SAVE AS dialog is not showing.
    the window does not show when i select SAVE AS.
    SAVE works.. but i often want to save a new version without overwriting the old.
    i don´t know why it happens but it seems that BIG files (panoramas or many layers) are affected more often.
    happens 3-5 times a week.
    never had this problem with PS prior to CC.
    my system:
    intel I7 2600K
    16 GB ram
    GTX 770 (latest drivers)
    240 GB SSD (OS windows 7 64 bit)
    120 GB SSD (60GB free for scratch files)
    2 TB harddisk (1 TB free for scratch files)

    Photoshop should not crash even with big files so apparently there is something wrong.
    yeah obviously...
    Have you tried resetting Photoshop's preferences yet? That sometimes cures malfunctions.
    i have resetted the preferences yes.
    photoshop should not crash i agree.... but as you can read here in this forum it does.
    no software is free of bugs.... and i have worked long enough with computers to burry that expectation.

Maybe you are looking for

  • Can you get the original bytes/format from a BufferedImage

    Applications allows users to select file and then the contents of the files are embedded into an mp3 file, but also allow images to be dragged or copy and pasted and in vertainn cases I only recieve the image as an Image DataFlavor (new DataFlavor("i

  • I need to make a dividing line go down the length of each page

    I have the line in my master page. It separates my main content from the sidebar. I just got to a page where the main content runs deeper than my sidebar, so the short dividing line looks odd. I first tried to get around this by pinning it, but that

  • LR export to Photoshop - won't send as a PSD!

    When I select a CR2 file and choose to "edit in adobe photoshop CS3..." the image opens in CS3 (with no dialogue box to ask if I want to edit a copy of original, etc.). It won't open as a JPEG or PSD file. The filename on the opened PS file ends in .

  • Satellite 2410-414 soundcard input mono or stereo?

    Is there a way to record in stereo from an external sound source using the yamaha ac-xg soundcard? Is there a way to activate the line-in in the audio and volume settings? Can the input socket be set up for stereo recording or does it only record in

  • How do I get my purchases to be available on multiple computers

    I have a MacBook Pro and a Mac Mini. I recently purchased some videos on the MBP but want to be able to access the videos on the Mini. I have both authorized to me Apple ID and have checked for available downloads. Any thoughts hoe to get the videos