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);
}
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);
}
解决方案 »
- 在Swing界面调用Access数据库的的表格会出现CPU的使用率高达100%,应该怎么解决求大侠赐教
- tomcat申请证书,并认证了证书,但是还是通不过,高手来,解决了,再多给分
- 对答案不理解,希望得到帮住
- 工作中遇到的一个实际问题(在线等)
- 请问有那个包可以监测目录中的文件改变,谢谢
- java编程难题
- NetBean4.0中不能用"."后面会有method的提示的问题!
- 一道简单的关于多线程的问题
- 求jfreechart文档。分不够再加
- 菜鸟提问:ListStudents.java:24: unreported exception java.sql.SQLException; must be caught or declared to be thrown
- ArrayList添加对象后,所有项都变成一样了
- 每日一题2
public void performed(ActionEvent e) {
new JFrame();
}
});