Results 1 to 2 of 2
  1. #1
    patriotsfan is offline Member
    Join Date
    May 2011
    Rep Power

    Default Need Help with displaying JFrame through an html file using an applet

    I made a program using netbeans swing/matisse to build a GUI and I want to know if its possible to use an applet to open that program from an html file. I created a new java applet and it does open the JFrame (Within netbeans) but 2 windows pop up, 1 being the empty applet, and 1 being the JFrame. I want the JFrame to open directly in html file and if possible not show the applet window, any suggestions?

    Here is my code for applet....
    Java Code:
    package EdmondsVet;
    import java.applet.*;
    import javax.swing.JApplet;
    import javax.swing.JFrame;
    	public class Applet1 extends JApplet
    	    VetGUI newFrame;
    	    public void init()
    	        newFrame = new VetGUI();
    I also have some html code but it does not work......

    XML Code:
    <applet code = "Applet1.class" width="400" height="100">

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Blog Entries
    Rep Power

    Default Re: Need Help with displaying JFrame through an html file using an applet

    No, if you create an applet it displays an applet. If you're smart, your GUI will be geared to create a JPanel since that way if you desire you can display it in a JFrame for a stand-alone app or in a JApplet for applet type application.

Similar Threads

  1. Components not displaying on JFrame
    By mDennis10 in forum New To Java
    Replies: 5
    Last Post: 07-27-2011, 08:48 PM
  2. Displaying HashMap in a JFrame
    By ankit1801 in forum New To Java
    Replies: 1
    Last Post: 05-19-2011, 08:54 AM
  3. Opening applet with .html file
    By Atriamax in forum New To Java
    Replies: 12
    Last Post: 09-13-2009, 07:26 AM
  4. Replies: 0
    Last Post: 03-10-2008, 03:36 PM
  5. init() method displaying html
    By reddzer in forum Java Servlet
    Replies: 0
    Last Post: 11-10-2007, 08:20 PM

Posting Permissions

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