Results 1 to 1 of 1
Thread: Embed java applet in JFrame
- 12-09-2009, 01:05 PM #1
Member
- Join Date
- Dec 2009
- Location
- Maine
- Posts
- 11
- Rep Power
- 0
Embed java applet in JFrame
I'm trying to view a java applet on a web page, inside a JFrame.
Here is what I have so far:
What do I need to do, to make it work?Java Code:import java.net.URL; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JTextPane; public class Test { public static void main(String[] args) throws Exception { JFrame frame = new JFrame("Title"); JPanel panel = new JPanel(); panel.setLayout(null); JTextPane jtp = new JTextPane(); jtp.setSize(700, 700); jtp.setLocation(0, 0); jtp.setContentType("text/html"); jtp.setPage(new URL("http")); panel.add(jtp); frame.add(panel); frame.setLocation(0, 0); frame.setSize(700, 700); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setVisible(true); } }
Similar Threads
-
Embed video on web page - Application to Applet
By ConvoyTh in forum Java AppletsReplies: 1Last Post: 11-27-2008, 07:05 AM -
Have to embed link to website in JFrame
By pkumar85 in forum New To JavaReplies: 0Last Post: 11-24-2008, 12:01 AM -
Help, Embed video in java applet?
By darthbane13 in forum New To JavaReplies: 0Last Post: 08-29-2008, 10:09 PM -
How Do I Embed Java Correctly To A Web Page
By abcd in forum Java AppletsReplies: 7Last Post: 01-28-2008, 07:53 AM -
JFrame vs Applet
By baltimore in forum AWT / SwingReplies: 1Last Post: 08-06-2007, 03:24 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks