Multiple windows in my application

Hi I�m trying to design a application that asks the user for a log in id and password first before entering the main application I�m no sure the best way of go about this any suggestions?? I was thinking of using Jtabbedpane but I�m sure there is a nice better way of doing this!! Or do I make my different windows as separate classes and then group them 2gether someway (I a novice so take it easy on my plz)
Thanks very much

I've done something similar with cardLayout. Once a valid username and password are accepted just show the appropriate card and vice versa.
In my example, the logon shows a different screen for Doctors and Patients. Hope this helps you get started
        // If the doctor button was selected and the person is in fact a doctor
        if (tempPerson instanceof Doctor) {
          // User is successfully identified. So proceed with creating the appropriate
          // UI Panel
          JFrame mainFrame = (JFrame)this.getTopLevelAncestor();
          Container theContentPane = mainFrame.getContentPane();
          theContentPane.add(new DoctorViewPanel( (Doctor) tempPerson),
                             "doctor");
          refresh();
          mainFrame.pack();
          CardLayout theContentPaneCardLayout = (CardLayout) (theContentPane.
              getLayout());
          theContentPaneCardLayout.show(theContentPane, "doctor");
        }

Similar Messages

  • How is it best to develope a multiple window (front panel) application in LabVIEW?

    I have only been using LabVIEW for a couple months so keep this in mind while I ask this question.
    I have been testing out multiple ways of developing a application using multiple windows and passing data between them, in LabVIEW. I am not sure how to best do this. First (See attached TestApp1.0) I used the Open VI.vi to open and close the VIs as I wanted to use them. This worked well I could have multiple windows open at once and could easily pass data to them by simply laying the VI in the main while loop. The draw back was it required polling and lots of extra logic to open and close the different VIs.
    Next I used the event loop ( see TestApp2.0)and eliminat
    ed the use of Open VI by simply laying the VIs into the event loop and selecting them to display front panel when called. The draw back to this was I could only have one window opened at a time, and since I had to put the SubVIs in loops I could not pass data easily from another form to it while it was running.
    Finally, I have seen examples using a VI server. This looks much more complex and I am not sure if it would be worth the time figuring it out.
    Does anyone have any suggestions for what the best way to design this type of application is? Am I missing something?
    Attachments:
    TestApp1.0.zip ‏31 KB
    TestApp2.0.zip ‏23 KB

    Hello NIBOUND,
    I looked into your "Method 1"-files. That's roughly
    the way I would do this, but I changed the files a
    little bit.
    The subform2 (input of data) is now only called when
    the user wants to input some data. I changed the
    window setting to "Open when called" and "Close after
    run". The other vi subform1 runs the whole time in
    your main loop. Is this wanted? If not, then you can
    change it to the same behaviour as subform2...
    Best regards
    Gerd
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome
    Attachments:
    Test1.zip ‏32 KB

  • Opening and minimizing multiple windows using office applications.

    Hello. I just to get some information regarding multitasking on ipad. My question is this: can you open, hide or minimize two windows at the same time just like what we can do with normal netbooks/laptops? What I mean is if you are using docstogo office, can you minimize both word documents so that you can view or read documents on one window while you do typing or editing on the other windows? Is it possible? Thanks.

    No, you can't.
    The iPad is not a netbook or a laptop, and if you want that then don't go down the iPad route.
    On the other hand, if you accept the way it does work, you'll find a unique device that you can't live without!

  • Multiple forms in multiple windows within application

    hi,
    our user wants to be able to open more than one form in multiple windows within the application and have them within the application window at the same time. we are planning to use open_form instead of call_form to do this. however open_form does not let me specify the query mode, so i guess will have to do that manually? what does Oracle recommend as a best practice for applications - to support mutliple windows or not? if yes, as call_form or open_form?
    thanks.

    Yes using open form you will have to manually (in code) switch into Query Mode.
    We recommend Open Form over call form as it is more memory efficient, of course there are situations when the behaviour of Call Form is useful but generally I'd encorage the use of open.

  • The red, green and yellow buttons in the upper left corner of the screen disappear whenever I open Safari.  I cannot minimize the Safari window which I often need to do if I am coordinating multiple windows.  Does anyone know how to get those buttons back

    The red, green and yellow buttons in the upper left corner of the screen disappear whenever I open Safari.  I cannot minimize the Safari window which I often need to do if I am coordinating multiple windows between different applications.  Does anyone know how to get those buttons back?  I guess I could just switch betwen appliations, but I am used to doing it the other way.

    You're welcome 
    You had Safari in full screen mode.

  • How can I switch between multiple windows of the same application (e.g. Safari) over several desktops ?

    Hi All,
    I have one application, for example safari, open and running with multiple windows (with or without tabs) spread over several desktops.
    How can I switch between the windows only via keyboard? CMD+> and CMD+< let me only swicht between windows open on the one desktop I am currently looking at.
    thanks for your replies,
    equi

    Barney,
    many thanks for your efforts and your time (preparing and posting the screenshot, answering to this question,...).
    Unfortunately, moving the focus to the next window only works with windows on the same desktop.
    btw, using a german keyboard layout and german language settings the shortcut is "cmd+<".
    I can switch with this shortcut between different windows of my Safari which reside on the same desktop, but I cannot swith between different safari windows distributed over several desktops.
    Thanks,
    equi    

  • Does a multiple language supported Windows Phone 8 Application support Bengali Language (Bangladeshi language)?

    Hello,
    I am developing  a Windows Phone 8 application (for Nokia/ Microsoft Lumia) where multiple languages will be supported. Now, it is needed to support Bengali (Bangladeshi language) in my Windows phone 8 application.
    But, I didn't find Bengali language in the Setting -> Language -> phone Language. So could anyone tell me that a multiple language supported windows phone 8 application support Bengali language or not. If it is possible, then how user will change
    the app language from phone setting?
    FYI .. From Microsoft OEM documentation, I have known that Windows Phone 8.1 GDR2 includes support for Bangla (Bangladesh language). 
    Thanks

    Hi NONAME-2007,
    As far as I known the Bangla language is supported as a on-screen keyboard language on the Windows Phone 8. But it is not supported as a display language in Windows Phone 8, so you can not choose this language from the phone setting. For more information,
    please try to refer to the following article:
    http://www.windowsphone.com/en-us/how-to/wp8/basics/feature-and-service-availability .
    Best Regards,
    Amy Peng
    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.

  • ITunes setup on a NAS with multiple windows users - how?

    iTunes setup on a NAS with multiple windows users?
    I am very confused on what is the best way to handle this setup for my friends family.  Any help would be appreciated.  Sorry in advance as I know this is a long winded post - I have a feeling this will help others faced with the same issues or questions.
    CURRENT SETUP
    I have three new Windows 7 machines networked (two desktops and one laptop) that have four users on each - as busy family with children who need the computers for homework, projects, games, etc...  The goal of this setup is that any user can log onto any computer and have there documents available to them no matter computer was free to use.  I set this up using the library function in Windows 7 and seems to work pretty well.
    I have put a Buffalo Linkstation NAS on the system as well.  This was going to serve two purposes 1)  run some backup software to protect the computers and 2) consolidate the iTunes content in one place for all users.  There is also an iPad in the home that I should would be better served by accessing the content on the NAS without requiring any of the computers being on.  Dave is thinking about getting some other playback devices like Apple TV so thought a NAS would be a good way to go.
    CURRENT ITUNES SETUP - I have created a new iTunes library on the NAS by holding the SHIFT button down while starting iTunes and pointed to that folder on a Share on the NAS.  There was no music on the system at the time as we are planning to copy this over from an OLD machine that is now not being used.  I have also authorized all the computers and turned on the home sharing feature (although I am not sure what good that does).
    This “shift” button trick seesm to also point the default directory there without point to it in the advanced setup tab of iTunes.
    I then synced one of the iPods with purchased content on it and synced that to the library after asking me to do so before an update.  All the content showed up in the library and was playable - awesome.
    I then logged into each user on each machine (yikes) and installed iTunes  and used the “shift” trick to connect each users iTunes to the database on the NAS.  Everything seems to work - but I have not tested it thoroughly.
    SUMMARY
    3 new Windwos 7 networked machines
    4 identical users on each machine
    1 TB Buffalo linkstation
    iTunes setup with the folder on a SHARE
    all user’s itunes connected to the iTunes folder on the NAS
    all computers authorized with home sharing turned on.
    one iTunes user account signed in on each machine
    multiple iPods and one iPad in the system
    QUESTIONS/CONCERNS
    Is there a better way to do this on a NAS?
    Would home sharing be better in some way?
    I understand the NAS should show up under the shared section in iTunes - I assume that would mean that would mean each user has an iTunes library on their documents?
    I have read that there may be corruption issues if users on the different machines try to access iTunes at the same time.
    Will there be any issues syncing that various iPods with?
    Ugh - sorry for the long post and all the questions.  I am just trying to find the best way to do this.  I wish Apple would put out a best practices document for setups like this.  Thanks in advance.

    This is a user to user support forum. Your fellow users can offer solutions or workarounds based on their experience with the application. If you think it should work differently drop a line to iTunes Feedback.
    For reasons unknown Apple haven't chosen to allow iTunes to be suspended in one profile and active in another. My recollection is that this applies even if each profile has a different library, although it is some time since I've committed a personal test.
    I'm not sure why my suggestion make less sense that your current approach?. As I understand it currently everybody is either signed into their own account when they can do something other than work with iTunes, or they sign into the special iTunes account where they can't access any of their other stuff. You don't have to disable fast user switching. Follow exactly the same steps, but make sure everyone closes iTunes before turning the computer over to another user. Disabling fast user switching helps to enforce that action.
    tt2

  • Why CreateNewFrame() returns as NULL after successful created 136 child frame window and trying to create 137th child frame window in MDI application

    I am working on MDI application which was developed in VC++ in VS 2012. When my application is launched, it will display a Tree. Under a tree there are 254 nodes. Basically
    these nodes data are read from Configuration xml file and loaded into the Tree. By double clicking on each node, first it will create object for document class ( By calling CreateNewDocument() method) after that member variables for that
    document class will be initialized and then it will create the new frame window (by calling
    CreateNewFrame(pDoc,NULL). New child frame window will show under Main window to the user.
    User able to see the data from child frame window.
    Similarly by double clicking on each node it will create another object for the same document class and new child frame window will be opened for that node. Each child frame window runs
    in different data and showed under the Main window.
    Existing requirement by double clicking on each node, node data shall show in separate child window and there is no requirement for all 254 child windows opened simultaneously.
    But current requirement is , all 254 child windows shall open simultaneously by double clicking on each node one by one.
    In debug mode I have tried double clicking on each node. I able to open up to 50 nodes. After 50th child windows are opened, I unable to access to the application
    (Unable to open further node data window since application is getting hanged).
    Each child window is having tree, multiple splitter window and some additional controls (static text, ...).
    Same I have tried in release mode, I able to open up to 136 child windows. After that the application fail to create the new frame window in VS 2012. i.e CreateNewFrame() return
    NULL after successful created 136 child frame window. Debug purpose I have added the code to retrieve last error code by calling GetLastError() method. I got the value as "0". By closing any existing child window then I able to open remaining nodes.
    At any point of time I can reach maximum of 136 child frame window that can be opened under Main window. Failing to open all 254 child frame window
    simultaneously,  currently I fail to meet the current requirement.
    current Requirement is all 254 child frame window are opened simultaneously. Please let me know what may be the reason fail to create new frame window after 136 frame window that are
    opened already. In Microsoft site, mentioned that there is no limitation for creating frame  window in MDI application. I have tried another sample MDI application having limited number of controls, in which I able to create "n"
    number of child frame windows. why not able to create more than 136 child frame window in my actual application?
    Is there any possibility by changing project settings allow me to create 254 child frame window??
    Code Snippet as below:
    CDiagBaseDoc * CDiagBaseMDocTemplate::OpenDiagView( ...)
         CDiagBaseDoc* pDoc = NULL;
        if (pDoc == NULL)
            pDoc = (CDiagBaseDoc*)CreateNewDocument();
        if ( pDoc )
           CFrameWnd* pFrame = NULL;
           if (bAlreadyOpen)
                  // If Child frame window already opened, then handling the code here.
         else
               pFrame = CreateNewFrame(pDoc, NULL);
               if (pFrame == NULL)
                  ASSERT(FALSE);
                  delete pDoc;       // explicit delete on error
                 pDoc = NULL;
              ASSERT_VALID(pFrame);
              if( pDoc != NULL ) //VS2012
                 if ( !pDoc->OnNewDocument() )
                    TRACE0("CDocument::OnNewDocument returned FALSE\n");
                    delete pDoc;       // explicit delete on error
                    pDoc = NULL;
                    pFrame->DestroyWindow();
                     pFrame = NULL;
           if (pFrame)
               InitialUpdateFrame(pFrame, pDoc);
               ShowWindow( pFrame->GetSafeHwnd(), SW_MAXIMIZE ); //when opening node for the 1st time, maximize it
    }<o:p></o:p>

    Hi MuruganK,
    Have you checked how much memory your application used? You could check it by Task Manager. Maybe your application reach Memory Limits for Windows.
    https://msdn.microsoft.com/en-us/library/windows/desktop/aa366778%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396
    Is it possible that there are some memory leaks in your application? It would better if you have made a simple sample to reproduce and narrow down this issue.
    Best regards,
    Shu
    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.

  • How can I have multiple WINDOWS (NOT tabs) with INDEPENDENT content?

    How can I have multiple '''windows''' (''not ''tabs) with '''independent''' content?
    I used to be able to open separate windows with Firefox, and the content could be completely different in each window. No matter what I did in any window, no OTHER window open at the time, nor any of the content therein, was affected. This is no longer the case and it is extremely frustrating for me.
    I do ''not ''like tabs and do not use them. I prefer multiple windows plus I am so used to using them, for so many years now! But with v9.0.1 I suddenly can no longer do what I've always done with my browser without this aggravating problem constantly reminding me that I can't have what I want in firefox anymore.
    Or can I? Does anyone have a solution I don't realize exists?
    Thanks,
    Sowelu

    AppleScriptObjC can use pretty much everything in the Cocoa API, so yes, it is possible.
    Note that a view is not the same as a window, and a window can have multiple views. There are also many ways to implement "tabs";  take a look at some of Apple's applications - they use various mixtures of toolbars, checkboxes, and radio buttons, for example.  An application such as this will be a lot more involved than what you have done so far though, using custom classes and subclassing existing ones, so be prepared to do a lot of reading and researching.

  • How do I open multiple 'windows' in Entourage?

    I am using MS Entourage and would like to be able to open multiple windows within that program. For example, I would like to have both my calendar and address book opened at the same time in different windows. I have looked all over for a way to do this, but I have not had any luck. Any ideas? Please forgive me if this is an easy answer. I am still new to the Mac world, but love it so far. Thank you.

    At the Entourage menu bar, go to File > New and select Open New Main Window. You can open an additional two main windows and select the Address Book for one and the Calendar for the other.
    To navigate to a different window, at the menu bar go to Window and select Mail, Address Book or Calendar.
    The Mail.app does not incorporate all 3 applications. You can have the Mail.app, Address Book and iCal launched and running and select between each from the Dock along with other ways to do so. The Mail.app also includes an Address Book panel to view all Address Book contacts or to select from when addressing a message. You can't add to, delete or edit contacts from the Mail.app Address Book panel.

  • Multiple windows of the same class with a different argument

    Suppose I have a main window with a list of users. If I click on any one user, the "chat window" should open with the argument as that "user".
    If i click on another, a similar "chat window" should open but with a different user.
    I can't have so many stages because I don't know how many users are there.
    How do I open multiple windows of the same class but with a different argument?

    Here is a sample (opens, at random locations, a bunch of child windows parameterized by color).
    Could be simpler, but hopefully you get the gist.
    import java.util.Random;
    import javafx.application.Application;
    import javafx.geometry.Rectangle2D;
    import javafx.scene.Scene;
    import javafx.scene.control.Label;
    import javafx.scene.layout.StackPane;
    import javafx.stage.*;
    public class ColoredStages extends Application {
      final String[] colors = { "firebrick", "palegreen", "azure", "chocolate", "goldenrod" };
      final Random random = new Random(42);
      Rectangle2D screenBounds;
      public static void main(String[] args) { launch(args); }
      @Override public void start(Stage stage) {
        screenBounds = Screen.getPrimary().getVisualBounds();
        stage.setTitle("Primary");
        stage.setScene(new ColoredScene("cornsilk"));
        stage.show();
        for (String color : colors) {
          Stage coloredStage = new ColoredStage(stage, color);
          coloredStage.show();
      class ColoredStage extends Stage {
        ColoredStage(Stage owner, String color) {
          super();
          initOwner(owner);
          initStyle(StageStyle.UTILITY);
          setX(screenBounds.getMinX() + random.nextInt((int) screenBounds.getWidth()));
          setY(screenBounds.getMinY() + random.nextInt((int) screenBounds.getHeight()));
          setScene(new ColoredScene(color));
      class ColoredScene extends Scene {
        ColoredScene(String color) {
          super(new StackPane());
          StackPane layout = (StackPane) getRoot();
          layout.getChildren().addAll(new Label(color));
          layout.setStyle("-fx-font-size: 20px; -fx-padding: 30px; -fx-background-color: " + color);
    }

  • One View in multiple Windows

    Hi,
    This is rather a note than a question and written purely in the hope of Google finding it if I (or someone else) ever need it again:
    Situation: (V = view; W = window)
    is displaying a table
    has a view container with embedded in it
    opens as a popup
    contains
    also has a view container with embedded in it
    contains
    --> as a picture: [Link to ImageShack|http://imageshack.us/photo/my-images/684/constellation.png/]
    in words:
    A view showing a table is used in two other views . One of the using views is called in a popup window by the other using view .
    What happens in this situation is a dump with this error message in the browser:
    View Is Already Displayed in Window of Component {..}
    Details:
    As the error message says, may not be displayed by two windows at the same time. One might think that not displaying by making it invisible (either by using a parent container or other suitable element) should solve the problem...
    Let me tell you before: IT DOES NOT!
    Solution:
    To really "hide" you need to display a different view instead of it in its View Container element.
    The easiest way to do this is to add an EmptyView to the ViewContainer in , together with plugs to call the EmptyView and seperately.
    Now you have to fire the plug for the EmptyView just before opening the popup . After closing the popup you have to fire the plug for . -> Voila, the same view is used in both windows!
    Negatives:
    1. Obviously you really cannot show the view in both windows at the same time, but as a popup with more than a yes/no question usually hides most things below it, this should not be the biggest issue.
    2. When firing the plug for the view is built anew, meaning the whole WDDOINIT, ... running. Apart from having impact on your implementation of these methods, this might also be a pain in respect to performance.
    Hope this helps! If anyone has helpful comments or wants to create a picture for the solution, please post!
    Kind Regards
    Robert Schulz

    Finally got it-
    This is a new security feature added in version 9.3.3.
    Currently, when /workspace and /workspace/index.jsp commands are issued, a new instance of EPM Workspace is launched in a separate browser window. With the single instance feature, subsequent invocations of /workspace/ and /workspace/index.jsp opens items in EPM Workspace tabs, even when launched from an external URL. Single instance also prevents extra EPM Workspace windows from closing existing session(s) where multiple EPM Workspace windows were previously allowed.
    URL Parameter to Override Single Instance Behavior:
    By default, there can only be one instance of EPM Workspace on a client machine. However, there are instances where multiple sessions of EPM Workspace must remain open. For example, Financial Management may need to do a side by side comparison of applications. You can override the default setting to allow multiple window names with the URL parameter, multi_process=true appended to the EPM Workspace URL.
    TL;DR Use /workspace/index.jsp?multi_process=true to utilize multiple sessions of Workspace.

  • Disabling opening of multiple windows and tabs

    Hi experts,
    do we have any option to disable opening of multiple windows and tabs. Like making end user to use single window browser to do all operations.
    Regards
    Govardan Raj S

    HI Rajendra ,
    Actually if end user access the portal in a browser window , and if he opens another window i.e file->new window --- same portal applications will open in the new window with the same credentials and hence here i should either restrict him or log off the user in both windows.
    Regards
    Govardan Raj

  • How do i open multiple windows in itunes 11?

    how do i open multiple windows in itunes 11?

    At the Entourage menu bar, go to File > New and select Open New Main Window. You can open an additional two main windows and select the Address Book for one and the Calendar for the other.
    To navigate to a different window, at the menu bar go to Window and select Mail, Address Book or Calendar.
    The Mail.app does not incorporate all 3 applications. You can have the Mail.app, Address Book and iCal launched and running and select between each from the Dock along with other ways to do so. The Mail.app also includes an Address Book panel to view all Address Book contacts or to select from when addressing a message. You can't add to, delete or edit contacts from the Mail.app Address Book panel.

Maybe you are looking for