Windows and Menu Bars

Hi everybody,
I'm not having a code problem as of yet, I'm just not sure how to do something, so I would appreciate it if someone could give me a push in the right direction. I'll try to explain my problem as clearly as I can.
I have a JFrame with a JMenuBar on the top. When I click on an option in one of the JMenus in the menu bar, a JDialog comes up. Depending on the dialog, the menu bar at the top of the main frame gains or loses menus. I can make one dialog work correctly, but I'm not sure how robust the solution is.
My problem comes when there are multiple dialogs open. If there are multiple dialogs open, and I close one, I want the most recently selected dialog (of those that are still open) to be selected, and that dialog's menus placed on the menu bar.
I already have a method for opening dialogs, putting up the right menus, and removing the menus I don't want. All I need is how to select the appropriate dialog (or the main frame, if the last dialog is closed). I think it might have something to do with component listeners, but I'm not sure and I'm confused. Can anyone help me out?
Thanks,
Jezzica85
Edited by: jezzica85 on Oct 14, 2008 8:42 AM

I think it might have something to do with component listenersWindowListener#windowActivated
jezzica85 wrote:
Thanks baskaraninfo,
I'm not quite sure what you mean about using the HashMap. Do you mean I should put a copy of each dialog in the HashMap as I create them, then get the most recent one? It sounds like it could be a good idea; I just don't quite understand your logic.
Thanks,
Jezzica85I think you're losing sight of the fact that variables don't hold objects, they hold references.
baskaraninfo's suggestion to use an ArrayList looks good. You would add each dialog to the ArrayList at index 0 when opened. When activated you would remove it from the list and again add it at index 0. When closed you would remove it from the list and activate the dialog now at index 0 (which was at index 1 before the removal), or the frame if the list is empty (size = 0). May need some wrapping in SwingUtililties.invokeLater if there's any concurrency problem.
db

Similar Messages

  • How to hide the default windows inherit menu bar

    Dear All,
    I am using oracle Application server 10g with windows server 2003. with oracle 11g database.
    When ever I am accessing the application from client machine through browser i am getting the windows inherit menu bar at the top of the working space of the form.
    I want to hide that default menu bar from viewing the application users.
    Please help.
    Thank you in advance....

    actually vansul i have done this the default smart bar is removing by doing this
    but i want to hide the black window bar which is displayed even if by removing
    the default & smart bar.

  • Right part of menu bar and menu bar clock freezes.

    Right part of menu bar and menu bar clock freezes after a few minutes works. Happens every single session and seems to not be affected of what programs that are running.  There are other anomalities too, which seem to be somehow related, affecting my main software (Finale).  Keyboard Maestro and Time Machine are always running in the background.  Any ideas?

    Nope.
    BTW:  After restart, it all seems to work.  This seems to happen after the MBP has been taking a nap and in all following sessions.
    It's a 2 months old MBP, 8 gB RAM, all the newest updates on everything.

  • Hello i need help for adobe creative cloud...when i launch application adobe  cc 2014  for photoshop or illustrator.....the apps launch and i can see the workspace and menu bar  for a while and  suddenly this application close automatic

    hello i need help for adobe creative cloud...when i launch application adobe  cc 2014  for photoshop or illustrator.....the apps launch and i can see the workspace and menu bar  for a while and  suddenly this application close automatic

    Sign in, activation, or connection errors | CS5.5 and later
    Mylenium

  • I'D LIKE TO VIEW MY SAFARI WHERE I CAN STILL DISPLAY MY DOCK AND MENU BAR....HOW DO I DO THIS...DO NOT WANT FULL SCREEN

    I'D LIKE TO VIEW SAFARI WHERE I CAN STILL DISPLAY MY DOCK AND MENU BAR...DO NOT WANT FULL SCREEN.  HOW DO I DO THIS?

    You can also go up to "View," and look all the way down to "Exit Full Screen."
    Command+Control+f will toggle it off and on.

  • How to open a new browser window without toolbar, location, and menu bars from AIR?

    I have the following problem in my Flex+AIR application. I need to embed an ActiveX component that has JavaScript API inside my application. I tried to embed it inside <mx:HTML> component but unfortunately, AIR doesnot support plug-ins or ActiveX controls. So I've decided to open it in a new browser window. I tried navigateToURL(...) method but it has two problems - it is opening a new tab in the existing browser window and there is no way for me to configure the new browser window appearance, like removing toolbar, menu bar, location bar, etc. Then I tried to open a new window from JavaScript running inside <mx:HTML> component using window.open(...) API but it doesn't open a new window at all.
    Is there any way for me to open a new browser window without toolbar, location bar, etc. (which will run ActiveX control, so it cannot be AIR window) from inside AIR?
    Best regards,
    Arkady.

    Is it possible to open a new browser window using JSP?a JSP page is also an HTML page, this is client side stuff, you can do it with JavaScript.

  • In my fire fox window every thing has disappeared including firefox tab and address and menu bars and the problem is persisting even after reinstalling the brow

    i used hotspot shield after that this problem occured. the whoole screen is blank and i cant see or do anything on firefox except closing it or opening a new tab via CNTROL +T

    You can check for problems with the localstore.rdf file.
    *http://kb.mozillazine.org/Corrupt_localstore.rdf
    You can use this button to go to the Firefox profile folder:
    *Help > Troubleshooting Information > Profile Directory: Show Folder
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    Can you bring up the menu bar with pressing the F10 key or tapping the Alt key?
    *View > Toolbars (press F10 to display a hidden menu bar)
    Open the Customize window to set which toolbar items to display:
    *Firefox menu button > Options
    *View > Toolbars (press F10 to display the menu bar)
    *Right-click empty toolbar area
    *check that "Bookmarks Toolbar items" is on the Bookmarks Toolbar
    *If the "Bookmarks Toolbar items" is not on the Bookmarks Toolbar then drag it back from the toolbar palette in the customize window to the Bookmarks Toolbar
    *if missing items are in the toolbar palette then drag them back from the Customize window on the toolbar
    *if you do not see an item on a toolbar and in the toolbar palette then click the "Restore Default Set" button to restore the default toolbar set up

  • Installed Firefox on Windows 7 but the menu and icons bar is full of little horizontal lines over the icons and menu bar..

    I installed Firefox 21 on a new Windows 7 OS. The menu bar and the icon bar at the top of the windows is full of little horizontal lines. Sometimes there are more lines and sometime less lines. It makes the icons and the menu items almost impossible to see. So far it's only the Firefox screen that does this. The other programs I installed so far doesn't do this.
    Any ideas?

    Hello,
    The Reset Firefox feature can fix many issues by restoring Firefox to its factory default state while saving your essential information.
    Note: ''This will cause you to lose any Extensions, Open websites, and some Preferences.''
    To Reset Firefox do the following:
    #Go to Firefox > Help > Troubleshooting Information.
    #Click the "Reset Firefox" button.
    #Firefox will close and reset. After Firefox is done, it will show a window with the information that is imported. Click Finish.
    #Firefox will open with all factory defaults applied.
    Further information can be found in the [[Reset Firefox – easily fix most problems]] article.
    Did this fix your problems? Please report back to us!
    Thank you.

  • Computer starts up but HD and Menu bar are not visible?

    Recently my Powerbook G4 began to act strangely and either freeze or slow way down for the first time in its four years of use. I have a new IMac to replace it. Here is my current problem:
    I'm trying to copy over some files via Firewire. I start my powerbook in target mode. Its icon appears on my new imac and I start to copy over. Midway through copying, I dragged an open window to a different place on the screen of my new computer, and the copy stalled/froze. I couldn't drag the target HD icon to the trash to shut down my powerbook properly, so I held down its power key and it turned off.
    Now, when I try to restart the powerbook in target mode, its icon wont appear on my new computer's desktop, though the 'I'm in target mode' screen saver bounces around on my powerbook.
    When I try to boot up my Powerbook to shut it down properly on its own, it starts up, but the stuff I have stored on my desktop, including the HD icon, don't appear. Neither does the menu bar, so I can't shut it down that way. The dock appears, as does the photo that I use for my desktop image. I can click on dock applications, and they do the bouncy thing, but they don't open.
    Any ideas? Thanks very much to anyone who can help!

    And how did Single User Mode work out?
    If you can't start it up in SUM or from an installer disc, put it in FW Target Disk mode again and see whether Disk Utility on the host Mac can see it to make repairs. DU may be able to see the drive even if it doesn't appear on the desktop of the host machine.
    My guess is that by disconnecting it improperly in FWTDM (not that you had much choice under the circumstances), you well and truly hosed the hard drive.

  • All of my tool bars and menue bars and event the web addreses are gone. how do i get them back

    every timr fire fox opens, i have my tabs. that's it. no web addresses, no menu bar, no forward or back, nothing.
    == This happened ==
    Every time Firefox opened
    == i acidentally clicked to remove menu bar ==
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; GTB6.4; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET CLR 1.1.4322)

    Hit the '''Alt''' key to show the Menu bar, then open View > Toolbars and select Menu bar, so it has a check-mark. Also, check-mark the other toolbars you want to see.

  • Can't see any page except tool bar and menu bar

    I am using firefox as my default browser.
    When I tried to open the browser, only the tool & menu bar appeared but not the page below ( where we can read the contents.

    Very similar topic. I have a g5, but I have a windows desktop, windows laptop, and xbox360. I have an airport extreme card with the antenna in place. The two windows machines have their wireless network cards and antenna.....the xbox has it's wireless adapter. When I start up the machines, the three microsoft machines connect just fine, the G5 won't connect. I can run an ethernet cable to the Linksys G router, and sometimes that kicks in the airport card. But who wants to do that every day.
    I can share files between the two windows machines, but not to the powermac. not sure about the xbox360.....the wireless adapter is an xmas present. But connected via ethernet cable, the xbox won't work with anything.
    Help please.
    Harry.
    I just bought a new router with the notebook which I got a couple of weeks ago. The old router was a B and the new one a G, but that is moot. Everything is backwards compatible....and none of the machines support X.

  • Launching URL without Address bar and Menu Bar

    Guys,
    I use the following piece of code to launch an URL from the application. I want to launch the URL without address bar & Menu bar. how this could be achieved?
    <af:goLink id="gl1" targetFrame="_blank"
    destination="/faces/com/abc/xyz/pages/page2.jspx?oppid=#{row.oppId}">
    <af:outputText value="#{row.OpportunityNumber}" id="ot13">
    </af:outputText>
    </af:goLink>

    Dev,
    As far as I know, the only way to request a browser window to open without address/menu bar is via JavaScript (note that it's just a request - depending upon the browser being used and the security settings, the address bar in particular may end up being shown anyway). So, I don't believe you can do this with an af:goLink.
    Note: why do you include an af:outputText as a child for af:goLink? af:goLink has a "text" property to display the text.
    Note #2: It appears as if you are launching a link to the app itself - is the only reason you're using af:goLink instead of af:commandLink in order to ensure that the link opens in a new window?
    John

  • Removing tool bar and menu bar to the navigated page through ADF

    Hi,
    Through facesconfig iam navigating to the other page, some thing like my method returns a striing "success" in faceconfig i made to navigate to page2.jsp if it receives success,
    My current requirement is to remove the tool bar as well as manu bar from the navigated page i.e. page2.jsp, i could n't able o configure that, can any one please help me on this.

    Yeah exactly i am talking about the browser window, let me explain you once more,
    the bellow iam calling from first.jsp
              FacesContext fc=FacesContext.getCurrentInstance();
              Application ac=fc.getApplication();
              NavigationHandler navigationHandler=ac.getNavigationHandler();
    try{
    navigationHandler.handleNavigation(fc,null,"success");
    }catch(Exception e){
    in faces config.xml i have used
    <navigation-rule>
    <from-view-id>first.jsp</from-view-id>
    <navigation-case>
    <from-outcome>success</from-outcome>
    <to-view-id>second.jsp</to-view-id>
    <redirect/>
    </navigation-case>
    </navigation-rule>
    right now what i need is when the page traverses to the second window i.e second.jsp i shudn't see menu bar and tool bar in my browser window.
    hope this will clear my question, any one please help me out......
    please let me know the sollution even if there is any in JSP

  • Acrobat Reader window in Windows 7:  Menu bar disappears, window cannot be moved or resized.

    The problem appeared when Acrobat Reader XI was installed; uninstalling it, and re-installing Acrobat Reader X, didn't solve the problem:  Once a document is loaded into the reader, the Windows' menu bar is overwritten by the Reader toolbar; the window then cannot be moved, resized, or closed, and menu items such as "File" and "Edit" are unavailable.  This happens only with Acrobat Reader, and only when there is a document being viewed.  I suspect something in the Reader XI installation process clobbered a Registry entry, and it has remained clobbered

    Please update Kaspersky (KIS 2015) to its latest version 15.0.1.415 and that should fix the issue.
    Refer the Kaspersky forum thread: http://forum.kaspersky.com/index.php?showtopic=307391&hl=Adobe
    Regards,
    Rave

  • Bluetooth disappeared from system preferences and menu bar...

    My bluetooth preferences disappearead from system preferences as well as the menu bar. I discovered this because my bluetooth mighty mouse stopped working. I tried replacing the batteries but nothing happened. I used my trackpad to click on the bluetooth icon on my menu bar and told it to connect to my mouse, which was there in the list. I got the swirling ball and so restarted my computer, when it came back, bluetooth was gone from the menu bar and system preferences, so now I don't know how to reconnect my mouse.
    I tried resetting the PRAM and NVRAM as recommended by another post, I tried it twice as the instructions outline, but I haven't had any success.
    I have tried doing spotlight for bluetooth in system preferences, this takes me to keyboard and mouse, then I get this message:
    "The Bluetooth tab of Keyboard & Mouse preferences is hidden because you don't have a Bluetooth module installed or attached to your computer."
    When I do a spotlight on the entire system, I get a result for bluetooth in system preferences, when I click on that, I get this message:
    "You cannot open “Bluetooth” preferences pane because it is not available to you at this time. You might need to connect a device to your computer to see this preferences pane."
    But, the irony is, that I can't connect a bluetooth device without this option in preferences. Also, in utilities, I remember that there used to be a bluetooth setup assistant, and that is not longer there.
    I realize other threads have come up on this, but I haven't found anything besides deleting the plist, restarting, and resetting the PRAM and NVRAM (whatever that is). I've tried this but haven't been successful so I'm looking for more ideas.
    Dan

    HI Daniel,
    Try deleting this file.
    com.apple.preferencepanes.cache
    ~/Library/Caches.
    Move that file to the Trash and restart your Mac.
    If that doesn't help, download and install the 10.5.8 combo update available here.
    http://support.apple.com/downloads/MacOS_X_10_5_8_ComboUpdate
    It's ok to do this even though you are already running 10.5.8.
    Make sure and repair disk permissions after the installation.
    Quit any open applications/programs. Launch Disk Utility. (Applications/Utilities) Select MacintoshHD in the panel on the left, select the FirstAid tab. Click: Repair Disk Permissions. When it's finished from the Menu Bar, Quit Disk Utility and restart your Mac. If you see a long list of "messages" in the permissions window, it's ok. That can be ignored. As long as you see, "Permissions Repair Complete" when it's finished... you're done. Quit Disk Utility and restart your Mac.
    Carolyn
    Message was edited by: Carolyn Samit

Maybe you are looking for

  • Stuck with SpryEffects

    My tables with master / detail relationship work fine on this page. The SpryEffects.js has been referenced from the head section. So far so good. Now I got stuck with applying effects to the div including the album covers. How can I exactly create an

  • Authorisation report

    Hi Gurus Is there any report in SAP for checking authorisation of all employee in one shot   or OR Checking that how many SAP user id is using a particular transaction or infotype. Regards Waseem

  • [Solved] Latest GTK2 [2.20.1-1] package breaks gtk apps

    Hey guys, I just did a pacman -Syu for the latest set of updates, and discovered immediately that both firefox and chromium (not sure of other apps though I suspect so) crash. After rolling back to 2.20.0-2 my system began to work again without furth

  • Problemas con Photoshop Album 2.0 y Photoshop CS2

    Hola, Antes tenia photoshop Album 2.0 y hotoshop CS, y desde Album 2.0 podia ir por la opción editar con photoshop al CS2 directamente, en cambio desde que instale el CS2 me ha desaaparecido esta opcion y no puedo ir al CS2 de inguna forma. ¿alguien

  • IPhone could not be updated. An unknoen error occurred

    Hi, Just bought a 2nd hand iPhone4 but can't upgrade to iOS6. Phone details are;      Version: 5.1.1 (9B208)          Model: MC605X      Modem Firmware: 04.12.01 iTunes 10.6.3.25 on Windows 7 returns the following error when trying to update;      -