TA的每日心情 | 开心 2021-3-12 23:18 |
---|
签到天数: 2 天 [LV.1]初来乍到
|
- 一个有趣的开窗户游戏:
- 当你点击游戏界面中的一个正方形按钮时,它周围的正方形按钮的颜色就会发生变化,
- 当全部正方形按钮的颜色变为一色时,你就胜利了!想试一试吗?[url=OpenWindows/OpenWindows.html]请点击这里[/url]
-
- [img]http://img.javaxxz.com/2014/10/2/000959062.gif[/img]
-
- 它的源代码如下:
- import java.awt.*;
- import java.awt.event.*;
- import javax.swing.*;
- class OpenWindows{
- public static void main(String[] args){
- JFrame.setDefaultLookAndFeelDecorated(true);
- JFrame frame=new JFrame("开窗户游戏");
- frame.getContentPane().add(new Mainpanel());
- frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- frame.pack();
- frame.setVisible(true);
- }
- }
-
复制代码
源码下载:http://file.javaxxz.com/2014/10/2/000959203.zip |
|