Results 1 to 2 of 2

Thread: Open another form

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2009
    Posts
    176

    Open another form

    Hi.

    I'm using NetBeans IDE 6.8, and this is my first program in Java in maby 3 years.

    Now I have made two packages, and in this packages I have made two files(JDialog Forms):
    *boot - main.java
    *login - login.java

    How can I now from login.java(Package: login) open the file main.java (Package: boot) ?

    And whats the difference between JDialog Form and JPanel Form ?

    Because I have working in Visual Basic and a bit in C++ before, and there I only used Windows Form Application, so which one of these would be most like that?

    // Kevin, New to Java
    PHP Code:
    $im_addicted_to_programming true

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

    Re: Open another form

    Neither a JDialog nor a JPanel is a form, a JDialog is a dialog, a JPanel is a panel, A JFrame or a JWindow are somewhat like windows forms.

    You can add multiple JPanels to a JFrame. To show the JFrame or a JDialog just call it's "setVisible" method and pass true in the args list. Just like in VB or any OO language, you have to instantiate the class before calling its methods
    "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