MCPcopy Create free account
hub / github.com/DuGuQiuBai/Java / move

Method move

day25/code/txz_demo/src/cn/itcast/txz/ui/MainFrame.java:143–145  ·  view source on GitHub ↗
(JLabel c, int vMoveType, int hMoveType)

Source from the content-addressed store, hash-verified

141
142 // �ƶ����ƣ�����ԭʼλ�ý����ƶ�����2������ʾ��ֱ�����ƶ��������ƶ�����3������ʾˮƽ�����ƶ��������ƶ�
143 private static void move(JLabel c, int vMoveType, int hMoveType) {
144 c.setLocation(c.getX() - hMoveType * 50, c.getY() - vMoveType * 50);
145 }
146
147 public void keyPressed(KeyEvent e) {
148 int keyCode = e.getKeyCode();

Callers 1

keyPressedMethod · 0.95

Calls 2

getXMethod · 0.80
getYMethod · 0.80

Tested by

no test coverage detected