简体   繁体   中英

Applet is not going to stop running

import java.awt.EventQueue;
import javax.swing.JFrame;

public class Window1 extends JFrame {
private JFrame frame;
}

When I run this code I get an applet running which I don't want. Any help is appreciated Thx Applet window

在此处输入图片说明

See this, Is it stopping now?

import java.lang.Runnable;
import javax.swing.SwingUtilities;
import javax.swing.JFrame;

public class Window1 extends JFrame {

    public static void main(String... args){
        javax.swing.SwingUtilities.invokeLater(new java.lang.Runnable() {
            public void run() {
                Window1 window = new Window1();
                window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                window.setBounds(200, 200, 400, 300);
                window.setVisible(true);
            }
        });
    }

}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM