?? jiemian.java
字號:
package denglu;
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
public class jiemian extends JPanel{
private static final long serialVersionUID = 1L;
private Image bg;
private JFrame j;
private JButton b1,b2,b3,b4,b5,b6;
public jiemian(){
initOther();
initWindow();
}
private void initWindow(){
this.setLayout(null);
b1=new JButton("退出");
b2=new JButton("卡內轉帳");
b3=new JButton("查詢帳戶");
b4=new JButton("現金提取");
b5=new JButton("密碼修改");
b6=new JButton("操作記錄");
b1.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
new Login1();
j.dispose();
}
});
b2.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
new TranseferCash();
j.dispose();
}
});
b4.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
j.dispose();
}
});
b5.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
new Change();
j.dispose();
}
});
b6.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
new FirstAwt();
j.dispose();
}
});
try{
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
SwingUtilities.updateComponentTreeUI(this);
} catch(Exception exe){
exe.printStackTrace();
}
b1.setBounds(10, 450, 100, 30);
b2.setBounds(550, 150, 100, 30);
b3.setBounds(550, 250, 100, 30);
b4.setBounds(550, 350, 100, 30);
b5.setBounds(550, 450, 100, 30);
b6.setBounds(10, 350, 100, 30);
add(b1);
add(b2);
add(b3);
add(b4);
add(b5);
add(b6);
j=new JFrame("");
j.setSize(700,500);
j.getContentPane().add(this,null);
j.setUndecorated(true);
j.setLocationRelativeTo(null);
j.setVisible(true);
j.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
private void initOther(){
bg=Toolkit.getDefaultToolkit().createImage(this.getClass().getResource("login/bj1.jpg"));
MediaTracker mt=new MediaTracker(this);
mt.addImage(bg,0);
try{
mt.waitForAll();
} catch(Exception exe){
exe.printStackTrace();
}
}
protected void paintComponent(Graphics g){
super.paintComponent(g);
g.drawImage(bg,0,0,this);
}
public static void main(String[] args) {
// TODO Auto-generated method stub
new jiemian();
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -