Results 1 to 3 of 3

Thread: New Frame

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2006
    Posts
    87

    New Frame

    hei,, its very simple...

    i have a login frame in my app,the question is..
    how will i show the main frame after i clicked the "Ok" button??? thanks...

  2. #2
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171

    Re: New Frame

    This? In your action listener for the OK button? Or are you having trouble with implementing an action listener?

    Code:
    		MainWindow MW = new MainWindow();
    		MW.pack();
    		MW.show();


    Has someone helped you? Then you can Rate their helpful post.

  3. #3
    Arabic Poster ComputerJy's Avatar
    Join Date
    Nov 2005
    Location
    Happily misplaced
    Posts
    2,513

    Re: New Frame

    Quote Originally Posted by manavo11
    This? In your action listener for the OK button? Or are you having trouble with implementing an action listener?

    Code:
    		MainWindow MW = new MainWindow();
    		MW.pack();
    		MW.show();
    fatal mistake don't ever use the:
    Code:
    frame.show();
    always use
    Code:
    frame.setVisible(true);
    Another thing, I don't think a main window is something you create on click you make it visible, you don't want changes to be discarded
    "I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
    My Blog

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width