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

Method victory

day25/code/txz_demo/src/cn/itcast/txz/ui/MainFrame.java:230–260  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

228
229 // ʤ���ж�
230 private void victory() {
231 if (count == total) {
232 // �Ƴ���������¼��������û��������
233 this.removeKeyListener(this);
234 // ���´���Ϊ���ֲ�룬��Ҫ��������Ϻ����ն���
235 JDialog victory = new JDialog(this, "��ϲ��ȡ����ʤ��!���Dz��͡���JAVA��ѵ��ҵ����콢",
236 true);
237 victory.setSize(400, 300);
238 victory.setLocationRelativeTo(null);
239 victory.setLayout(null);
240
241 JLabel info = new JLabel(new ImageIcon("gg.jpg"));
242 info.setBounds(2, 2, 380, 180);
243 victory.add(info);
244
245 JLabel click = new JLabel(new ImageIcon("gg2.jpg"));
246 click.setBounds(2, 182, 380, 88);
247 click.addMouseListener(new MouseAdapter() {
248 public void mousePressed(MouseEvent e) {
249 try {
250 Runtime.getRuntime()
251 .exec("rundll32 url.dll,FileProtocolHandler http://www.itcast.cn");
252 } catch (IOException e1) {
253 e1.printStackTrace();
254 }
255 }
256 });
257 victory.add(click);
258 victory.setVisible(true);
259 }
260 }
261
262 public void keyReleased(KeyEvent e) {
263 }

Callers 1

keyPressedMethod · 0.95

Calls 1

addMethod · 0.45

Tested by

no test coverage detected