Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: different between japplet, jframe, jdialog, jwindow, jpanel

  1. #1
    Member
    Join Date
    Oct 2012
    Posts
    133
    Thanks
    16
    Thanked 0 Times in 0 Posts

    Default different between japplet, jframe, jdialog, jwindow, jpanel

    so i know japplet, jframe, jdialog, jwindow, jpanel windows to create gui.

    japplet = you use japplet for website with no resizeable or main buttons
    jframe = ???
    ...


    try to explain as much as you can. i want to know adv and dis of these window.


  2. #2
    Super Moderator helloworld922's Avatar
    Join Date
    Jun 2009
    Posts
    2,896
    Thanks
    23
    Thanked 619 Times in 561 Posts
    Blog Entries
    18

    Default Re: different between japplet, jframe, jdialog, jwindow, jpanel

    The classes named Jsomething (JApplet, JFrame, JButton, etc.) are part of the Swing windows toolkit. This is an java implementation layer on top of the AWT toolkit, which interfaces with the native operating system stuff (Applet, Frame, Window, etc.). Basically unless you have a good reason to use AWT, I would recommend sticking with Swing. There are also the SWT toolkit, but this is not part of the standard Java API. The main reason for using Swing is because it tends to fit better together with the rest of your Java program, has more features, and overall in my opinion is easier to use compared to AWT (I've never really used SWT so I don't have any opinion on it).

    If at all possible don't mix and match components from different toolkits into the same GUI. Chances are your GUI won't quite turn out how you wanted it to without some finagling and poor hacks. Even though Swing is built on top of AWT, the main components between the two just don't fit together well in the same GUI.

    There are a variety of resources online which explain the difference between the various components, so I'll just link to them and let you dive through the material.

    Using Top-Level Containers (Swing)

    How to Use Panels (Swing)

    JFrame Javadoc

    JWindow Javadoc

    JPanel Javadoc

Similar Threads

  1. [SOLVED] Flicker with JPanel in JApplet
    By tgjava in forum AWT / Java Swing
    Replies: 10
    Last Post: June 4th, 2012, 11:52 PM
  2. Replies: 1
    Last Post: April 30th, 2012, 08:16 AM
  3. JDialog from JFrame button (GUI)
    By Jameseyboy in forum What's Wrong With My Code?
    Replies: 2
    Last Post: April 5th, 2012, 07:55 AM
  4. [SOLVED] What is not right here? adding JPanel in JFrame
    By Asido in forum AWT / Java Swing
    Replies: 2
    Last Post: August 23rd, 2010, 08:16 AM
  5. JPanel in JFrame
    By maele in forum AWT / Java Swing
    Replies: 2
    Last Post: March 8th, 2010, 04:12 AM