我的程序中一切都正确吗?
当我运行它时,会出现一个屏幕,但它说 Applet 未初始化
import java.applet.Applet;
import java.awt.*;
import javax.swing.*;
public class JobseekerLogin extends Frame {
public void CreateFrame(){
Frame frame = new Frame("Frame in Java Swing");
frame.setSize(400, 400);
frame.setVisible(true);
Label lb = new Label("Username");
add("East",lb);
add("West",new TextArea(""));
Label lb1 = new Label("Password");
add("East",lb1);
add("West",new TextArea(""));
}
public static void main(String []args){
JobseekerLogin obj = new JobseekerLogin();
obj.CreateFrame();
}
}