文件名称:java做的抽奖转盘
文件大小:8.62MB
文件格式:RAR
更新时间:2015-01-15 11:49:40
java
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"))); button.setOpaque(false); button.setContentAreaFilled(false); button.setBorder(null); button.setBounds(277, 202, 139, 209); imagePanel.add(button); } }
【文件预览】:
22.02
----进阶与提高()
--------net()
----src()
--------com()
----bin()
--------com()
--------net()
----.classpath(355B)
----.settings()
--------org.eclipse.jdt.core.prefs(629B)
----.project(501B)