package stu.view;import java.awt.Color;
import java.awt.Container;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPasswordField;
import javax.swing.JTextField;
import javax.swing.UIManager;public class Interface extends JFrame {private static JLabel nameLabel, wordLabel;
private static JTextField nameText;
private static JPasswordField wordText;
private static JButton a1Button;
private JButton a2Button;
private JLabel Alttext;public Interface() {
super("魅管理系统");
setSize(400, 300);
setResizable(false);
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());} catch (Exception e) {
}Container a1 = getContentPane();
a1.setBackground(Color.WHITE);
a1.setLayout(null);nameLabel = new JLabel("用户名:");
wordLabel = new JLabel("密 码:");
Alttext = new JLabel("魅 无所不能");
Alttext.setForeground(Color.red);
Alttext.setLocation(90, 50);
Alttext.setSize(300, 40);
Alttext.setFont(new Font("Serief", Font.ITALIC + Font.BOLD, 40));
nameText = new JTextField(12);
wordText = new JPasswordField(12);
a1Button = new JButton(" 退出");
a2Button = new JButton("登入");
nameLabel.setBounds(80, 120, 50, 25);
nameText.setBounds(130, 120, 100, 20);wordLabel.setBounds(80, 150, 50, 25);
wordText.setBounds(130, 150, 100, 20);
a1Button.setBounds(200, 200, 80, 20);
a2Button.setBounds(100, 200, 80, 20);
a1.add(nameLabel);
a1.add(nameText);
a1.add(wordLabel);
a1.add(wordText);
a1.add(a1Button);
a1.add(a2Button);
a1.add(Alttext);
  setVisible(true);
setDefaultCloseOperation(EXIT_ON_CLOSE);
}public static void main(String[] args) {
new Interface();
}}
package stu.view;import javax.swing.*;public class Stuinfo {
public static void main(String[] args){
JFrame frm=new JFrame("魅 无所不能");
frm.setSize(900, 700);
frm.setVisible(true);
}