Results 1 to 2 of 2
- 10-15-2011, 01:37 AM #1
Member
- Join Date
- May 2011
- Posts
- 38
- Rep Power
- 0
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....
I also have some html code but it does not work......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(); newFrame.setSize(550,550); newFrame.setVisible(true); } }
XML Code:<html> <body> <applet code = "Applet1.class" width="400" height="100"> </applet> <body> </html>
-
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
-
Components not displaying on JFrame
By mDennis10 in forum New To JavaReplies: 5Last Post: 07-27-2011, 07:48 PM -
Displaying HashMap in a JFrame
By ankit1801 in forum New To JavaReplies: 1Last Post: 05-19-2011, 07:54 AM -
Opening applet with .html file
By Atriamax in forum New To JavaReplies: 12Last Post: 09-13-2009, 06:26 AM -
Applet - Displaying an HTML page with a selected resolution
By Java Tip in forum Java TipReplies: 0Last Post: 03-10-2008, 02:36 PM -
init() method displaying html
By reddzer in forum Java ServletReplies: 0Last Post: 11-10-2007, 07:20 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks