-
Notifications
You must be signed in to change notification settings - Fork 0
/
RuneTable.java
28 lines (27 loc) · 935 Bytes
/
RuneTable.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import javax.swing.ImageIcon;
import javax.swing.JPanel;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.event.MouseEvent;
import java.awt.event.MouseAdapter;
public class RuneTable extends JPanel{
private ImageIcon runeTableIcon = new ImageIcon("Resource/runeTable.jpg");
private Image runeTableImg =new ImageIcon("Resource/runeTable.jpg").getImage();
private ItemListPanel itemList;
public RuneTable(ItemListPanel itemList){
this.setLayout(null);
this.setBounds(0,0,1000,600);
this.addMouseListener(new PreviousHandler());
}
@Override
public void paintComponent(Graphics g){
super.paintComponent(g);
g.drawImage(runeTableImg,0,0,this.getWidth(),564,null);
}
private class PreviousHandler extends MouseAdapter{
@Override
public void mouseClicked(MouseEvent e){
GamePanel.changePreviousPanel();
}
}
}