分类：电脑/网络-程序设计-JAVA相关
问题：java请问怎么把applet加载到JFrame给个示例我看一下 
给个示例我看一下好吗?
回答：代码:import  t.*;import  t.event.*;import  .*;import java.applet.*;import javax.swing.*;/*** A very simple applet.*/public class SwingApplet extends JApplet {    JButton button;    public void init(){        getContentPane().setLayout(new FlowLayout());        button = new JButton("Hello, I'm a Swing Button!");        getContentPane().add(button);    }    public static void main(String[] args){        JFrame frame =new JFrame("JFrame&JApplet");        JApplet applet =new SwingApplet();         tContentPane().add(applet);                     it();         tDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);         tSize(320,240);         tVisible(true);    }}