📄 zuhe.java
字号:
import java.awt.*;
import java.awt.event.*;
class z extends Frame implements ActionListener
{
Button button1,button2,button3,button4;
z()
{
setLayout(null);
setBounds(300,200,400,400);
setBackground(Color.cyan);
setResizable(false);
setVisible(true);
validate();
button1=new Button("图书信息管理");
button2=new Button("读者信息管理");
button3=new Button("借阅信息管理");
button4=new Button("说明");
button1.addActionListener(this);
button2.addActionListener(this);
button3.addActionListener(this);
button1.setBounds(60,100,100,30);
button2.setBounds(160,200,100,30);
button3.setBounds(260,300,100,30);
button4.setBounds(350,25,50,30);
Font k=new Font("",Font.PLAIN,15);
Font f=new Font("",Font.PLAIN,10);
button1.setFont(k);
button2.setFont(k);
button3.setFont(k);
button4.setFont(f);
button1.setBackground(Color.lightGray);
button2.setBackground(Color.lightGray);
button3.setBackground(Color.lightGray);
button4.setBackground(Color.red);
add(button1);
add(button2);
add(button3);
add(button4);
button1.addActionListener(this);
button2.addActionListener(this);
button3.addActionListener(this);
button4.addActionListener(this);
addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent e)
{
dispose();
}
});
}
public void actionPerformed(ActionEvent e)
{
if(e.getSource()==button1)
{
//new bookJieMian();
//dispose();
}
else if(e.getSource()==button2)
{
new readerJieMian();
//dispose();
}
else if(e.getSource()==button3)
{
//new borrow("借阅信息管理");
//dispose();
}
else if(e.getSource()==button4)
{
new show();
}
}
}
class show extends Frame
{
show()
{
setLayout(new BorderLayout());
setTitle("说明");
TextArea area=new TextArea(10,20);
add(area);
Panel panel=new Panel();
area.append("图书馆的业务管理分为\n图书管理、读者管" +
"理、\n删除和查找。这些将有\n助于减少工作人员的工\n作量");
setVisible(true);
setBounds(350,300,400,300);
//setResizable(false);
Font k=new Font("",Font.LAYOUT_RIGHT_TO_LEFT,15);
area.setForeground(Color.MAGENTA);
panel.setFont(k);
panel.add(area,BorderLayout.CENTER);
//setBackground(Color.LIGHT_GRAY);
panel.setForeground(Color.lightGray);;
add(panel);
addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent e)
{
dispose();
}
});
}
}
public class zuhe
{
public static void main(String[] args)
{
new z();
}
}
;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -