Controling which window is open in application

Lets say I have an application in which I don't want to be able to open all available windows (options) at once. How can I control this in java? What do I need to do, what methods, code etc. I must use?
Thank You.

Ok. Sorry, for the delay in my answer. I was busy since tonight.
The first couple of messages helped me a lot but what I didn't know how to do is put an event listener for window close event. Since I'm new to Java and I'm using Net Beans IDE I finally figured out how to do it so I'll write it here:
Right Click on window (JFrame form) -> Events -> Window ->windowClosed
When the function opens put the code that will control other windows (setVisible), or disable menus on the main JFrame form window (setEnabled).
The reason I'm not using modal dialogs because this application I'm building is for a school project and our professor showed us only the JFrame forms. We didn't used modal dialogues yet.
So the problem is solved. I apologize if I caused some harm.
Thanks again for all answers.

Similar Messages

  • How do I have 2 windows, but select which window to open, e.g. a personal window vs. a business window?

    When I open Firefox I want to be able to select which window I want to open. Each window will have it's own set of tabs, which can change as I need to. This allows me to open Firefox with either a "personal" window or a "business" window or a "Social media" window etc. How can I do this?

    Try https://addons.mozilla.org/en-US/firefox/addon/morning-coffee/versions/1.33

  • Controlling which display Mail opens messages into

    I am a teacher. When using an alternate display, Apple software in general, and Apple Mail specifically, tends to open in the alternate display. So if i am working on my regular display screen and showing something to my class on the alternate display screen, Mail opens the new message in the alternate display, over top of the movie or whatever the class is seeing.
    There should be a preference to control this. At least Safari follows the pattern where is the current window.
    Is there a fix?
    Do Apple Mail software designers read this forum?

    I remembered the "Force Quit" option, that worked. Disregard, no other response necessary. Thanks.

  • How do I know/how can I control which video card a particular application uses?

    Hey there--
    Simple question: I have the ATI Radeon HD 2600 256 MB and the NVIDIA Quadro FX 5600 1536 MB installed via PCIe ports on an early 2008 Mac Pro. I've decided for a multitude of reasons that I'd like my displays to be plugged into the HD 2600, but I want certain applications-- Final Cut, games, etc-- to use the FX 5600. How can I be sure that this is happening? Is it possible? Will more intensive applications automatically utilize the proper card?
    Thanks much.

    Yes, it means the 7970 requires 1 x 6 pin and 1 x 8 pin. The Mac Pro supplies 2 x 6 pin, which is 75 Watts each.
    So Mac Pro can supply 75 Watts from PCIe slot and 2 x 75 Watts from 2 x 6 pin for the total of 225 Watts.
    The 7970 requires more than 225 Watts. There are people that run these cards from internal power and say the additional power pulled over the traces on the Mainboard won't damage the board, but I've seen several reports of burned out Mainboards and more commonly the PSU just shuts the Mac Pro down hard for safety reasons. Remember: the 2 x 6 pin ports power runs over traces(!) on the board, not over cables. If you over tax them this is a lot more dangerous as with cables.
    It's up to everyone to decide for themself if they want to risk running cards above the power provided by the Mac Pro.
    The safe way is always to go for 2 x SATA to 1 x 6 pin adapter and 2 x 6 pin to 1 x 8 pin adapters and provide the power for 7970 / R9 280x or GTX 780 in the Mac Pro like that. Or get an external / additional PSU for power hungry GPUs. That works, too.
    But you will obviously lose 2 x SATA ports. I run eSATA with RAID5 anyway, since RAID5 in the Mac Pro is too much of a hassle.
    Of course all that matters if it works in the end. But official power specifications are a matter you shouldn't take too lightly.

  • WINDOWS 8.1. When any window is opened (any application), after about 5-10 secs focus is lost. Even while working in the window.

    upgraded-to-windows-8.1-new-window-is-losing-focus-after- 10 seconds
    As you are working in one window the focus just switches to the desktop and the mouse position is reset to the top
    right corner.  Even if you are using the MAC.
    It is so frustrating..  No help from MS Support.  I can't believe there is no fix or patch for this.
    If I sold software like this .. it would not sell !!
    Anyone on this planet have a clue how to  fix this?

    Even if you are using the MAC.
    Since you mention this, I wonder if you might be using a virtualization solution like Parallels and Windows 8.1 inside a virtual environment. In this case, the input mechanism is provided by
    the virtualization platform and could be being reset after detecting that the focus has shifted into or out of the virtual environment. The best route for support if you are using a virtualization solution is to post your issue to the virtualization software’s
    support forums or contact technical support for the software.
    Brandon
    Windows Outreach Team- IT Pro
    Windows for IT Pros on TechNet

  • [SOLVED] Aria2: control which terminal it opens in

    as the header says. How do I tell aria2 to open in rxvt instead of xterm?
    can I use an export in my bash or do I have to edit the aria2.conf and if
    so how do I go about doing that?
    Last edited by orphius1970 (2010-01-18 03:36:45)

    Using the power of the mighty Google, I found you an answer.
    The procedure is simple, use rxvt as your download manager and call aria2c as one of it's options. Follow the directions here and you should be set. Don't forgot to read the man pages.

  • When opening a Photoshop file with Bridge, how can I control which version of Photoshop the file wil

    When opening a Photoshop file fthrough Bridge, how can I control which version of Photoshop the file will open in?
    I store my PSD files adjacent to the original RAW file from which it was derived.
    If I open the file folder and double click on that PSD file, it opens in CS6. But,if I use Bridge (CS6) to navigate to and open the same file, it first opens Photoshop CS5 and then opens that PSD file in CS5.
    How can I control which Photoshop will open a file I select when opening it through Bridge?.

    Interesting, but it doesn't give a clue what I'm supposed to do. No Photoshop ducuments listed.
    Look at the PSD file on the location Curt provided and search for Photoshop Document. Next to it ideally should show Adobe Photoshop CS6 if you have Bridge CS6 open. Click on it to provide the fly out menu and choose the correct Photoshop from the list.
    But probably something went wrong with your install. By default Bridge chooses the latest version of PS to open its file in.
    Maybe a reset of the preferences might also help you. Can you provide more details about OS version etc.
    And do you have a good reason for keeping your Raw and finished files in the same location. Personally I keep them apart and use a proper file name convention (yyyymmdd and details) so I can easily search for the DNG files in my archive if I needed them but I don't make mistakes in opening the wrong one

  • Accordion Menu - need to control which panel opens

    I have an accordion menu that works fine but when I put it
    into action
    on the site, I realized that I needed the accordion to open
    up a
    different section on each new page.
    Since I have the accordion menu in an SSI (server side
    include) I don't
    want to have a different spry asset for each page. However, I
    think
    setting a session variable would work to control which
    section is opened.
    Anyone done this? What would it look like?

    quote:
    Danilo Celic wrote:
    Try this page:
    http://foundationphp.com/tutorials/spry_url_utils.php
    Thanks a lot. This web page gave some answers, but now I have
    a new problem:
    When I test my accordion menu in a normal html page
    everything works fine. When I put this accordion menu to my DW
    template it stops working. The result is that every accordion's
    panels are open!
    Why? Can you assist me?
    In template head I have this code:
    <link href="../SpryAssets/SpryAccordion.css"
    rel="stylesheet" type="text/css" />
    <script src="../SpryAssets/SpryAccordion.js"
    type="text/javascript"></script>
    <script type="text/javascript"
    src="SpryAssets/SpryURLUtils.js"></script>
    <script type="text/javascript">
    var params = Spry.Utils.getLocationParamsAsObject();
    </script>
    And in template end just before </body> tag I have this
    code:
    <script type="text/javascript">
    <!--
    var Accordion1 = new Spry.Widget.Accordion("Accordion1",
    {useFixedPanelHeights: false, defaultPanel: params.panel ?
    params.panel: 0});
    //-->
    </script>

  • I have Lightroom 4.2 which isn't opening in Windows 7. A message comes up saying it's already open in another application. I've tried shutting down and restarting; still not opening.

    I have Lightroom 4.2 which isn't opening in Windows 7. A message comes up saying it's already open in another application; I can't see that it is. I've been using this successfully for 2 years now! I've tried shutting down and restarting; still not opening.

    Found it and deleted!! Success! Thank you!
    On Fri, Dec 12, 2014 at 2:12 PM, Mary Dennis <[email protected]>

  • Opening FPM Application in a seperate Model Window

    Dear Experts,
    I have a FPM Application which i need to open in new Window in my Webdynpro Application.
    As of now I am using the URL of the Application to open it as an external WIndow, this causes some problem while refreshing the main Webdynrpo view While closing the FPM application window.
    In the Main Webdypro view the refresh is not happeing since it is opening as an external WIndow.
    If i open as a model window it may solve the issue. But Since i am using the URL if i open a model Window using the Window name it is not calling the FPM application.
    Kindly give some suggestions or link to achieve the same.
    Thanks,
    Nalla B.

    Hi Nalla,
    I suggest you the below points to achieve your requirement
    Create a view V_FPM_APP and insert an iFrame ui element
    Create an attribute FPM_URL as string and bind it to the source of iFrame ui element
    Create a window, W_FPM_APP and embed the view V_FPM_APP
    Now, you can use method CREATE_WINDOW of interface IF_WD_WINDOW_MANAGER to open the FPM application and pass parameter MODEL = ABAP_TRUE
    You can register the onClose action of popup window to your own action on view as below
              data lo_view_ctrl type ref to if_wd_view_controller.
              lo_view_ctrl ?= wd_this->wd_get_api( ).
              lo_window->set_on_close_action(
                   exporting
                        view = lo_view_ctrl
                        action_name = 'ON_CLOSE'
    Create an action ON_CLOSE in view from where the popup window is called
    Now, you get the control when user closes the popup window, so, you can refresh the main view
    Also other way, you can use the concept component usages to achieve your requirement
    Hope this helps you.
    Regards,
    Rama

  • [LV 5.01 & Win98] Control a Windows Application

    Hi merry wirers!
    I'd like to control a windows program from out of a labview VI.
    Using DDE (I don't know how do that but there ought to be examples
    somewhere ) I could OPEN it allright ... But what I would like
    to do is to enter a few numbers into one of the programs forms and
    (which are to be found under a certain menu item which would also
    have to be selected) and hit the button.
    How would that have to be done? Can one sort off imitate key strokes
    under labview? I could start the application by the EXEC.VI ...
    The scripting host? I've never done anything with that so I'd have
    to learn that too. How would one have to start a script from LV?
    Use the CSCRIPT.EXE?
    Thank You,
    Christoph

    I assume that you are using RAS. Check the documentation there's a call to disconnect a current connection. I last worked with this stuff a year or so ago and so don't remember the exact details, but it was very easy to do and was in the Windows documentation on RAS.
    I do remember that it was all done through the command line because I had to come up with a way to trap the RAS responses and return them to LV.
    I know this isn't a complete answer, but I hope it points you in the right direction.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Opening mail application from the dock sometimes doesn't open window.

    In Mountain Lion, sometimes when I open Mail on the dock with a single left mouse (or touchpad) click, the Mail application opens, as shown in the menu bar, but a mail window doesn't open. I must then click or double click on it to get it to open a window. No other application in the dock behaves this way. How can I fix this?

    Is there a problem with mail opening from the dock?
    NOPE!  Do you have open at login enabled?  Is Mail listed in Login Items through System Preferences?
    My iMac is automatically up to date with all updates as at 09/01/2014.i
    Your system profile is a complete blank!
    When posting in Apple Communties/Forums/Message Boards.......It would help us to know which iMac model you have, which OS & version you're using, how much RAM, etc. You can have this info displayed on the bottom of every post by completing your system profile and filling in the information asked for.
    CLICKY CLICK---> https://discussions.apple.com/docs/DOC-3602
    CLICKY CLICK-----> Help us to help you on these forums
    ***This will help in providing you with the proper and/or correct solutions.***

  • HT1926 hey guys,i tried to install the latest version of itunes but when i try to open it,it just comes up windows error 2 apple application support was not found,can anyone help me out and tell me what i need to do pls ?

    hey guys,i tried to install the latest version of itunes but when i try to open it,it just comes up windows error 2 apple application support was not found,can anyone help me out and tell me what i need to do pls ?

    If you run into the "another installation" message even after the reboot of the PC (which is an excellent idea by HTP ProXy), reregistering your Windows Installer Service is worth a try.
    First, launch a command prompt as an administrator. In your Start search, type cmd then right-click on the cmd that comes up and select "Run as administrator".
    At the command prompt:
    Type %windir%\system32\msiexec.exe /unregister and hit enter.
    Type %windir%\syswow64\msiexec.exe /unregister and hit enter.
    Type %windir%\system32\msiexec.exe /regserver and hit enter.
    Type %windir%\syswow64\msiexec.exe /regserver and hit enter.
    Restart the PC and try another reinstalll.

  • Opening an application in a new window

    Hi,
    I have an ordinary java class, which has access to request and response objects.
    From here, I need to open a third party application in a new window.
    Please let me know how I can do this.
    Thanks,

    do you mean a new window as in a browser? if so you could use javascript:
    <INPUT type="button" value="Open new application" onClick="window.open('http://www.sun.com')>

  • You can't open the application "MFI_Simulator.exe" because Microsoft Windows applications are not supported on OS X. Can someone assist. I have Office for Mac 2011 on MacBook Pro 13''.

    You can’t open the application “MFI_Simulator.exe” because Microsoft Windows applications are not supported on OS X. Can someone assist. I have Office 2011 on my MacBook Pro, OS X, 10.9.1.

    Your Office 2011, though a Microsoft product, is designed to work with OSX the Mac operating system.  Any program/application ending .exe is an executable program for Windows.  It will only work in Windows and is not part of or openable with Microsoft Office.
    the application you want to open needs Windows - you have a couple of alternatives:
    Open it on a Windows PC
    Install a valid version of Windows via Bootcamp (or Parallels or VM Fusion) which will allow you to boot your Mac into Windows where it will function like a Windows PC and you can use it to run the application.
    See if the manufacturers of MFI_Simulator have a Mac version available.
    Please note that if you follow the second option, then you will need to purchase a copy of Windows (if you do not have one already). BootCamp is free (part of OSX) but Parallels and VM Fusion cost too.  I see quite a few posts from people who buy Parallels and try to run the program under Parallels - this doesn't work - you need to install Windows as well.
    Hope this helps.

Maybe you are looking for

  • NAT -LAST Question

    Dear All, i have the following question regarding the NAT Configuration. as Every One Knows we have in NAT Terminology the following Terms :- 1- Inside Local Address, which is Private Network or which is MY LAN IP Address . 2- Inside Global Address,

  • Anchored items size with javascript

    Hi all, I try to get the size of an item in my InDesign page, with the function geometricBounds. It causes a problem when my item is anchored to another one : I only get the bounds of the main item and not the anchored one (see the red arrow in the s

  • PhotoShop Crashing

    Im running windows 7 Home Premium amd Radeon Hd 7570 Intel(R) Core i-5 34-50 cpu @3.10 ghz 8gb ram 64 bit operating system I downloaded, redownloaded, restarted the computer and still the same thing. It start up and all of a sudden Photoshop has stop

  • PSE8 Organizer takes 2 trys to launch in Win7

    I'm running PSE8 in Windows 7 Ultimate. When I launch PSE8, get the Welcome screen, and click on Organize, I get a 'beep' and the Organizer icon appears on the task bar, but no window comes up. If I choose 'close window' from the task bar icon, and l

  • CS5 Mouse scroll up jumps full page

    I need some help. Just starting to use Flash but I've got this one issue that is just ruining everything for me. When drawing on the stage, any upward movement of my scroll wheel scrolls the screen by at least half a screen width, if not more. Scroll