GUI is not dispose/hide on my ActionListener

Hi all,
I have add a JEditorPane, a JLable, a JButton on a JPanel. Then I add that JPanel to a JDialog to avoid displaying the title bar on the system-tray. On a cation event I want to hide whole of them. Not to exit the system.
Here are the component declarations I used. It may help for your answer.
    private JPanel mainPanel = new JPanel();
    private JLabel mainLabel = new JLabel();
    public JButton mainButton = new JButton();
    private JEditorPane editor = new JEditorPane();
    private JDialog dialog = new JDialog();Add the action listener to the button and all properties as follows.
        editor.setEditorKit(new HTMLEditorKit());
        editor.setContentType("text/html");
        editor.setEditable(false);
        editor.addHyperlinkListener(this);
        editor.setBorder(new BevelBorder(BevelBorder.LOWERED));
        mainLabel.setText("HTML_Text");
        mainLabel.setSize(new Dimension(40, 20));
        mainLabel.setLocation(200, 200);
        mainPanel.add(mainLabel);
        mainButton.setText("Exit");
        mainButton.setSize(new Dimension(65, 25));
        mainButton.setLocation(200, 250);
        mainPanel.add(mainButton);     
// Add an ActionListner to the mainButton
        mainButton.addActionListener(new AbstractAction() {
            public void actionPerformed(ActionEvent e) {
                if("Exit".equals(e.getActionCommand())){  // Newly added code segment
        mainPanel.setLayout(new BorderLayout());
        mainPanel.setPreferredSize(new Dimension(300, 300));
        mainPanel.add(editor); Then I try follows.
                    dialog.dispose();
                    dialog.setVisible(false);Nothing happened at all.
mainPanel.setVisible(false);All the controls are vanished. But there is a gray color background is there. It's not dispose or any.
mainPanel.setVisible(false);This remains the label and the button with the above gray color background.
Can you guys tell me where I'm going wrong.
thanks.

you need to post some code that we can copy/paste/compile/run and see the problem in front of us.
just enough code to produce the problem, 20-50 lines normally, not a 1000 line program

Similar Messages

  • How Do I Correct FF GUI From Not Opening After Computer Restart

    Every time I restart my Win8 and then FF, the FF GUI does not open (i.e. the browser window does not appear) although Task M shows FF as running. Only work around so far is to re-install FF (obviously using another browser to access the download install site). I tried disabling all add-ins and this had no affect. Even if I exit FF before restarting the computer, the same issue occurs. If I exit FF but do not restart the computer, FF will re-start normally, meaning the browser window appears.
    This started occurring a couple of weeks ago. At that time I did a System Restore back to a point before it started happening and that did not correct the issue.
    I also uninstalled FF keeping my settings but the issue remained when I re-installed FF. I even went to the extreme of uninstalling and not keeping my settings and then reinstalling and adding my add-ins and setting my options (a couple hours of work) and the issue still remained.
    Once it is open I see no problems with it or any add-ins.

    Hi,
    From your issue description I understand that, you are unable to open any applications and the computer freezes.
    I can imagine the inconvenience you have experienced. Don’t worry; we will certainly help you.
    I would appreciate if you could answer the following question:
    1. What is the make and model of your computer?
    2. Did you receive the windows 8 preinstalled with the computer?
    3. What happens when you try to perform Refresh or Reset? Do you receive nay error messages?
    Let’s try some steps before performing Refresh or Reset.
    Follow these methods and check if it fixes the issue.
    Method 1: Run the Performance troubleshooter and check if the issue persists.
    Follow the steps to run the troubleshooter:
    a. Press Windows key + C on your keyboard to show the Charms bar.
    b. Type Troubleshooting and click Troubleshooting under Settings.
    c. Now type Performance Troubleshooter in the search option.
    d. Click on Performance troubleshooter to run the troubleshooter.
    Method 2: Start your computer in safe mode and check if the computer freezes.
    Step 1: Refer this link to start the computer in safe mode.
    http://windows.microsoft.com/en-IN/windows-8/windows-startup-settings-including-safe-mode
    If it works fine in safe mode, perform clean boot.
    Step 2: Perform clean boot.
    Clean boot will help us identify if any third party applications or startup items are causing the issue.
    To do this, follow steps from this link:
    http://support.microsoft.com/kb/929135
    NOTE: After checking the functionality in clean boot, configure Windows to use Normal startup. Refer step 3 from the above link for details.
    Method 3: Restore your PC to an earlier point in time.
    a. Swipe in from the right edge of the screen, and then tap Search.
    b. (If you're using a mouse, point to the upper-right corner of the screen, move the mouse pointer down, and then click Search.) Enter Recovery in the search box, tap or click Settings, and then tap or click Recovery.
    c. Tap or click Open System Restore, and follow the prompts.
    To perform refresh, or reset, refer to this link: How to restore, refresh, or reset your PC
    http://windows.microsoft.com/en-IN/windows-8/restore-refresh-reset-pc
    Refresh Warning: The apps that came with your PC or you installed from Windows Store will be reinstalled, but any apps you installed from other websites and DVDs will be removed. Windows puts a list of the removed apps on your desktop after refreshing your PC.
    Reset Warning: All of your personal files will be deleted and your settings will be reset. Any apps the came with your PC will be reinstalled, but all other apps will be removed.
    Hope this helps. If the issue persists or any Windows related queries or issues related to Windows Operating system, please get back to us. We are here to assist you.

  • How come the "do not dispose" option in photoshop doesn't have any effect on my stopmotion animations when I import them in After Effects?

    Hi,
    i'm trying to create an animation in photoshop. It's a sort of spiral shape that appears bit by bit.
    I'm drawing different frames, but each frame is build onto the previous frame. So i don't have to redraw to part that came before the new part:
    So first i drew all the different frames (yes they have transparent backgrounds). Then I selected all layers and went to window > animation.Here I made frames from all the layers and converted it to a frame animation. here I selected all frames and selected " do not dispose" because I want all the previous frames to stay visible when a new frame appears.
    Then  I did export >render video
    file options:
    image sequence: photoshop
    range: all frames
    render opt: straight
    frame rate: 20fps
    Now I get all the different layers as PSD files. After this I imported the files in after effects:
    file>import >multiple files 
    import as: footage, photoshop sequence, merged layers
    this gives me a single animated file with all the frames behind each other. But the "do not dispose" option has no effect here. I just shows all the different frames, but it disposes all previous frames. Instead of this as a final frame:
    I get this:
    Can someone help me with this? I'm kinda new to animation.

    An image sequence is an image sequence is an image sequence. AE does not care for specifics of PS' internal animation system and that is that. I'm also not clear why you choose to import as multiple files. A simple image sequence surely would do the trick?!
    Mylenium

  • Reader version listed in GUI does not match that of executable file (again)

    I posted regarding this issue before (http://forums.adobe.com/message/4817948), but was never able to find an answer.
    Presently I am deploying Adobe Reader 10.1.5 via the MSI installer and group policy. The issue is that a user shut down her Windows 7 computer midway though the MSI installation interrupting (i.e. screwing up) the installation process. I had to delete a few registry entries and reboot the user's PC in order to re-initiate the Reader installation (something I've done in the past).
    To verify that Reader was installed sucessfully, I browse to the Reader executable (AcroRd32.exe) in Program Files, double click the executable, select About Adobe from the Help menu, check the version number in the information box and see that the version number is 10.1.4 (i.e. the old version that I am upgrading from). However, when I browse to the Reader executable (AcroRd32.exe) in Program Files and and open the file properties, I see that the version is 10.1.5 (i.e. the new version that I am upgrading to).
    So the Reader version listed in GUI does not match that shown in the executable property box.
    This is the second time that this has happened with a Windows 7 PC. I've never experienced this sort of thing with a Windows XP PC.
    Why is the version number different in the GUI? Where is the version number read in from for the GUI? The registry? Can anybody shed some light on this situation?

    Let me clarify that the tool posted on http://labs.adobe.com/downloads/acrobatcleaner.html is not the uninstaller for Reader. Instead it is a cleaner tool used for any botched up installation as mentioned above. This utility should only be used in rare circumstances. Instead reader has its own uninstaller which can be used through ARP (Add Remove Programs) in Windows or you can also use the command line "msiexec /x AcroRead.msi" to uninstall Reader.
    Thanks,
    Vinod

  • "Using" and SPRequest object was not disposed

    Just trying to understand what is happening here. I have an event receiver that currently is not working (yet to find the bug).
    The code is incredibly simple and uses 2 "using" statements as per best practise in order to ensure the the objects are disposed of.
    When I look in the ULS logs and get the error for my event receiver it is immediatly followed by the "SPRequest object was not disposed" messages that I'm sure you have seen.
    Given that my code is within a using statement how can this be true?
    If there is a problem does "using" not clean up after itself like a try/catch may?
    I could change my code to be try/catch and clean up within the finally block but I thought using might clean up.
    Is this not the case or am I misunderstanding something?
    public override void ItemAdding(SPItemEventProperties properties)
    base.ItemAdding(properties);
    string theCourseName = properties.ListItem.Title;
    using (SPSite site = new SPSite(properties.WebUrl))
    using (SPWeb web = site.OpenWeb())
    SPListTemplate theTemplate = web.ListTemplates["CourseFeedback"];
    web.Lists.Add(theCourseName + ", Feedback", "Feedback from the course you attended", theTemplate);

    Hi QPR_JAY,
    If full of the error message content is"An SPRequest object was not disposed before the end of this thread",here is an article about it, and gave the reason and solution.
    http://littletalk.wordpress.com/2010/07/06/an-sprequest-object-was-not-disposed-before-the-end-of-this-thread/ .
    A similar post:http://social.technet.microsoft.com/Forums/sharepoint/en-US/d12df69e-12fb-4fe9-8707-40e34a1faae0/sharepoint-uls-logs-an-sprequest-object-was-not-disposed-before-the-end-of-this-thread
    Qiao Wei
    TechNet Community Support

  • The SAPinst GUI could not be started because a Java Runtime Environment

    Hi all,
    I AM TRYING TO INSTALL THE ECC 6.0 ON HPUX AND WHILE STARTING SAPINST GETTING THIS ERROR:
    The SAPinst GUI could not be started because a Java Runtime Environment (JRE) could not be found.
    Either the JRE is not installed correctly or the environment variable SAPINST_JRE_HOME is not set to the JRE installation home.
    Be aware the SAPinst server is still running! You need to start SAPinst GUI standalone on this or another host as described in the installation guide.
    103 controller.errorStartingGuiUnix  1697
    Please help

    Can you do a
    java -version
    as root?
    Did you install the Java runtime from http://www.hp.com/go/java for your platform?
    Markus

  • Reader version listed in GUI does not match that of executable file

    I have an interesting situation...
    I have Adobe Reader X installed on a Windows 7 desktop. When I go to the Reader installation files right click on the executable (AcroRd32.exe) and open properties, I see that the version is 10.1.4.38 and that the update date is July 28th 2012 (Which is consistent with the Reader X 10.1.4 release date). However, when I double click the same executable file and open About Adobe from the Help menu, the information box that appears states that the reader version is 10.1.3.
    So the Reader version listed in GUI does not match that of executable file's properties. Very, very strange.
    I am fairly sure that the version stated in the property box is correct, but am not 100% certain. So where is the version number read in from for the GUI? The registry? Can anybody shed some light on this situation?

    I don't know why you are seeing that, my Adobe Reader 10.1.4 shows this

  • Is it possible to make the document window not to hide behind the palettes?

    Is it possible to make the document window not to hide behind the palettes (layers, paths etc) like in CS5? For instance if I want to make a correction in the right part of the image and zoom in, the window expand under the different palettes and I can no longer see the area which I want to correct without change the document window size. I don't want to use the Photoshop application fram because then I can't see stuff in other applications ID, mail an so on. 

    I have written about how to control various font sizes in Thunderbird here:
    http://www.ramsden.org.uk/9_Type_sizes.html
    Generally, you shouldn't need to zoom; you can pre-set the display of message text.
    To get straight to the point, you should probably try the https://addons.mozilla.org/en-us/thunderbird/addon/theme-font-size-changer/ add-on to address issues with the size of the message list font.

  • Every time I save a gif on photoshop it automatically sets the frames to "do not dispose"

    Then I'll open it to change the set frame of the layers to "automatic" but it goes back to "do not dispose" How can I stop this from happening? I already reset my settings on photoshop.

    You posted in the Photoshop.com sharing and storage migration to revel forum.  Photoshop.com sharing and storage is being discontinued. You can use Revel (an alternative cloud storage and sharing choice) to store files in the cloud now if you like. Currently it supports jpg files only.  Go to Adoberevel.com to check it out or download the app for mac or iOS.
    It sounds like you want the elements/photoshop.com forum, so I will move this.
    Pattie

  • OVM Manager GUI is not coming up suddenly...

    Hi,
    I have installed OVM 3.0.1 manager and it used to work properly.
    But from last 2 days suddenly GUI is not coming up.
    It used to work with this URL: http://xxx:7001/ovm/console
    Tried rebooting system, restarting ovmm service.
    Don't know how to check weblogic server logs.
    can some one please help me.
    Thanks

    with https:
    https://<xyz>:7002/ovm/console
    same error:
    Error 404--Not Found
    From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
    10.4.5 404 Not Found
    The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.
    If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address.

  • System prefrences GUI is not loading but the folder does in os 10.6.8

    System prefrences GUI is not loading but the folder does in os 10.6.8

    You only get the GUI when you double-click on the app in /Applications/. The normal way to launch System Preferences is clicking on it's Dock icon. All you're doing when opening the package is seeing its components

  • HT4928 what if i wanted to delete one of my purchases not just hide it?

    what if i wanted to delete one of my purchases not just hide it can i do that?

    The Apple Support Communities are an international user to user technical support forum. As a man from Mexico, Spanish is my native tongue. I do not speak English very well, however, I do write in English with the aid of the Mac OS X spelling and grammar checks. I also live in a culture perhaps very very different from your own. When offering advice in the ASC, my comments are not meant to be anything more than helpful and certainly not to be taken as insults.
    No, Apple will always maintain the fact that you bought the app in your purchase history. You can't not have bought it.

  • Dispose or not dispose SPWeb object??

    Hey everyone,
    currently we have some performance problems in our production SharePoint farm. The ULS logs the error "Attempt to read or write protected memomy. This is often an indication that other memory is corrupt." Well, f*** :)
    So I downloaded the Microsoft dispose checker to check if there are any problems with the apps we developed for the SharePoint. Actually the tool found a problem:
    we have a feature which replaces the default v4.master with our custom masterpage. The dispose checker found a problem in the FeatureActivated method. Here is the code:
    public override void FeatureActivated(SPFeatureReceiverProperties properties)
    try
    SPWeb rootWeb;
    String serverRelativeUrl;
    String fullmasterpageUrl;
    object objWeb = properties.Feature.Parent;
    if (properties.Feature.Parent is SPWeb)
    rootWeb = (SPWeb)objWeb;
    else
    rootWeb = ((SPSite)objWeb).RootWeb;
    serverRelativeUrl = rootWeb.ServerRelativeUrl;
    serverRelativeUrl = serverRelativeUrl.EndsWith("/") ? serverRelativeUrl : serverRelativeUrl + "/";
    fullmasterpageUrl = serverRelativeUrl + "_catalogs/masterpage/" + MasterPageFile;
    setMasterpage(rootWeb, fullmasterpageUrl);
    catch (Exception ex)
    // exception handling
    private void setMasterpage(SPWeb web, String masterUrl)
    try
    SPWebCollection subwebs = web.Webs;
    if (subwebs.Count != 0)
    foreach (SPWeb subweb in subwebs)
    setMasterpage(subweb, masterUrl);
    web.MasterUrl = masterUrl;
    web.CustomMasterUrl = masterUrl;
    web.Update();
    web.Dispose();
    catch (Exception ex)
    // exception handling
    When I do not dispose the rootWeb in the FeatureActicvated method, the dispose checker tells me to dispose it with the hint "This may be a false positive depending on how the type was created or if it is disposed outside the current scope". Wenn
    I dispose the rootWeb the dispose checker tells me not to dispose the object.
    So... do I need to dispose the object or not??
    Thank you for your answers :)

    I can't see a currnet context, which is a reason typically not to dispose but I'm not a developer. 
    Just to try and add some form of useful response, have you read the suggestions here?
    http://msdn.microsoft.com/en-us/library/aa973248(office.12).aspx#sharepointobjmodel__conclusion
    Steven Andrews
    SharePoint Business Analyst: LiveNation Entertainment
    Blog: baron72.wordpress.com
    Twitter: Follow @backpackerd00d
    My Wiki Articles:
    CodePlex Corner Series
    Please remember to mark your question as "answered" if this solves (or helps) your problem.

  • ASMCA GUI does not start

    asmca gui does not start with the fresh 11gr2 installation on AIX 6.1. The ASM instance is up. I don't see any error messages in the asm alert logs. The display is set correctly and xclock works.
    Where else to check? I need to create the new disk group before i can create the database.
    export ORACLE_HOME=<GRID_HOME>
    export ORACLE_SID=+ASM1
    asmca
    is what i tried.

    Hi,
    Set all the environment variables for Oracle and try to run ASMCA again.
    ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
    ORACLE_HOME=/u01/app/11.2.0/grid_crs; export ORACLE_HOME
    ORACLE_TERM=xterm; export ORACLE_TERM
    PATH=$ORACLE_HOME/bin:$PATH; export PATH
    LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
    CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
    Regards,
    Levi Pereira

  • How do a really delete books from iBook store (not just hide them)?

    How do a really delete books from iBook store (not just hide them)?

    What do you mean? They do show in the Purchased items in iTunes. Click on the three little dots ... to the right of the last icon showing in the top left to get the list of other iTunes categories (like books). Click on Books, and then on Purchased:
    Cheers,
    GB

Maybe you are looking for