java做的抽奖转盘

上传者: jj604249196 | 上传时间: 2021-05-23 16:51:46 | 文件大小: 8.62MB | 文件类型: RAR
java课程设计 package com.lzw; import java.awt.*; import java.awt.event.*; import javax.swing.*; public class Demo extends JFrame { private final class ButtonActionListener implements ActionListener { private final ImagePanel imagePanel; private Thread imageThread; private ButtonActionListener(ImagePanel imagePanel) { this.imagePanel = imagePanel; } public void actionPerformed(final ActionEvent e) { if (imageThread == null || !imageThread.isAlive()) { imageThread = new Thread(imagePanel); imageThread.start(); } else if (!imageThread.isAlive()) { imageThread.start(); } } } public static void main(String args[]) { EventQueue.invokeLater(new Runnable() { public void run() { try { Demo frame = new Demo(); frame.setVisible(true); } catch (Exception e) { e.printStackTrace(); } } }); } public Demo() { super(); setTitle("抽奖大转盘"); setResizable(false); setBounds(100, 100, 700, 700); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); final ImagePanel imagePanel = new ImagePanel(); getContentPane().add(imagePanel, BorderLayout.CENTER); final JButton button = new JButton(); button.setCursor(Cursor .getPredefinedCursor(Cursor.HAND_CURSOR)); button.setPressedIcon(new ImageIcon(getClass() .getResource("bt2.png"))); button.setFocusPainted(false); button.setBorderPainted(false); button.addActionListener(new ButtonActionListener( imagePanel)); button.setIcon(new ImageIcon(getClass().getResource( "bt.png")));

文件下载

资源详情

[{"title":"( 25 个子文件 8.62MB ) java做的抽奖转盘","children":[{"title":"22.02","children":[{"title":"进阶与提高","children":[{"title":"net","children":[{"title":"lzw","children":[{"title":"RotateFrame.java <span style='color:#111;'> 1.77KB </span>","children":null,"spread":false},{"title":"RotatePanel.java <span style='color:#111;'> 1.51KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"src","children":[{"title":"com","children":[{"title":"lzw","children":[{"title":"bt2.png <span style='color:#111;'> 24.70KB </span>","children":null,"spread":false},{"title":"rotate.png <span style='color:#111;'> 238.64KB </span>","children":null,"spread":false},{"title":"zhuanpen.png <span style='color:#111;'> 2.92MB </span>","children":null,"spread":false},{"title":"bt.png <span style='color:#111;'> 23.98KB </span>","children":null,"spread":false},{"title":"Demo.java <span style='color:#111;'> 2.21KB </span>","children":null,"spread":false},{"title":"bg.jpg <span style='color:#111;'> 161.31KB </span>","children":null,"spread":false},{"title":"beijing.png <span style='color:#111;'> 4.90MB </span>","children":null,"spread":false},{"title":"ImagePanel.java <span style='color:#111;'> 2.59KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"bin","children":[{"title":"com","children":[{"title":"lzw","children":[{"title":"Demo.class <span style='color:#111;'> 2.08KB </span>","children":null,"spread":false},{"title":"bt2.png <span style='color:#111;'> 24.70KB </span>","children":null,"spread":false},{"title":"Demo$ButtonActionListener.class <span style='color:#111;'> 1.10KB </span>","children":null,"spread":false},{"title":"rotate.png <span style='color:#111;'> 238.64KB </span>","children":null,"spread":false},{"title":"bt.png <span style='color:#111;'> 23.98KB </span>","children":null,"spread":false},{"title":"ImagePanel.class <span style='color:#111;'> 2.90KB </span>","children":null,"spread":false},{"title":"Demo$1.class <span style='color:#111;'> 699B </span>","children":null,"spread":false},{"title":"bg.jpg <span style='color:#111;'> 161.31KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"net","children":[{"title":"lzw","children":[{"title":"RotateFrame$1.class <span style='color:#111;'> 651B </span>","children":null,"spread":false},{"title":"RotatePanel.class <span style='color:#111;'> 1.99KB </span>","children":null,"spread":false},{"title":"RotateFrame$2.class <span style='color:#111;'> 756B </span>","children":null,"spread":false},{"title":"RotateFrame.class <span style='color:#111;'> 1.39KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":".classpath <span style='color:#111;'> 355B </span>","children":null,"spread":false},{"title":".settings","children":[{"title":"org.eclipse.jdt.core.prefs <span style='color:#111;'> 629B </span>","children":null,"spread":false}],"spread":true},{"title":".project <span style='color:#111;'> 501B </span>","children":null,"spread":false}],"spread":true}],"spread":true}]

评论信息

  • liyang_admin :
    还不错,可以用的
    2020-09-11
  • _静怡 :
    谢谢分享,挺好用的
    2017-03-03
  • 青干剑客 :
    用别的方法实现了,这个多下了
    2016-01-22
  • 知惑而行 :
    虽然不是我想要的,不过还不错,稍加修改用在了别的地方
    2015-10-14
  • p996547 :
    很好,不错,能用
    2015-08-24

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明