登录
首页 » 其他 » Java自定义鼠标光标

Java自定义鼠标光标

于 2022-03-06 发布 文件大小:7.34 kB
0 152
下载积分: 2 下载次数: 1

代码说明:

super("自定义光标"); //调用父类构造函数   int[] cursor={Cursor.DEFAULT_CURSOR,Cursor.HAND_CURSOR,Cursor.MOVE_CURSOR,Cursor.N_RESIZE_CURSOR,Cursor.W_RESIZE_CURSOR,Cursor.WAIT_CURSOR,Cursor.TEXT_CURSOR}; //预定义光标数组   Container container=getContentPane(); //得到容器   container.setLayout(new FlowLayout()); //设置容器布局管理器   for (int i=0;i   JTextArea jta=new JTextArea(3,6); //实例化一个文本框对象    jta.setCursor(Cursor.getPredefinedCursor(cursor[i])); //设置文本框的光标    container.add(jta); //增加组件到容器上   }      Toolkit toolkit=Toolkit.getDefaultToolkit(); //得到默认的ToolKit对象   Image image=toolkit.getImage("cursor.gif"); //得到图像   Cursor customCursor=toolkit.createCustomCursor(image,new Point(6,6),"MyCursor"); //实例化自定义光标对象   JTextArea jta=new JTextArea(3,6); //实例化文本框   jta.setCursor(customCursor); //设置文本框光标   container.add(jta); //增加组件   setSize(300,160); //设置窗口大小   setVisible(true); //窗口可视

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 判断数列相邻n项和是否为和数,其中数列可有1000项,n可到10
    判断数列相邻n项和是否为和数,其中数列可有1000项,n可到10
    2022-08-22 15:22:37下载
    积分:1
  • 大家用用看 希望不久v1.1就要和大家见面了 账号密码 admin...
    大家用用看 希望不久v1.1就要和大家见面了 账号密码 admin-we can use. V1.1 will soon meet them and the account password admin
    2022-09-21 13:35:03下载
    积分:1
  • 通过确定的Lyapunov指数的混沌检测算法的实现。
    Realization of alogrithm of chaos detection by determining Lyapunov exponents.
    2023-06-24 21:50:02下载
    积分:1
  • 嗯
    知名游戏《模拟城市》(SimCity)公开了源代码,采用的是GPLv3许可证。由于版权方面的考虑,开源版本的《模拟城市》改名为 Micropolis,这正是它最初的开发代号。获得了《模拟城市》商标的持有者EA同意后,OLPC可以在XO笔记本上使用SimCity这一名称。负责《模拟城市》更新和维护的Don Hopkins为XO版本进行一些很cool的改动,程序也从最初的C代码换成了C++和Python。可以到这个网址下载所有不同版本的源代码。-Well-known game " Sim City" (SimCity) source code public, using the GPLv3 license. Because of copyright considerations, the open source version of the " Sim City" was renamed Micropolis, which is code-named its initial development. Access to the " Sim City" the holder of trademark EA consent, OLPC can be used in the XO notebook the name SimCity. Responsible for " Sim City" to update and maintain the XO version of Don Hopkins for some very cool changes, the program from the original C code into a C++ and Python. Can go to this website all the different versions of source code.
    2023-08-14 14:25:05下载
    积分:1
  • python爬虫(naver api)
    简单的爬虫小程序,可以通过api对网页对象进行捕获,如果将网页代码更改则可以获取其他网页的内容,并对其进行分析提取,得到搜索页中的一些信息,例如搜索标题,搜索数等等
    2023-06-02 19:30:02下载
    积分:1
  • 用于在MATLAB中绘制多坐标轴,将多个变量绘制在一张图中
    用于在MATLAB中绘制多坐标轴,将多个变量绘制在一张图中-MATLAB is used to draw multiple axes, multiple variables are plotted in a graph
    2022-03-14 14:31:07下载
    积分:1
  • easyarm2200 the entire CD
    easyarm2200整个光盘内容,包括在ADS的实验,UCOS的移植,以及在ucos下的实验,还有部分软件,有了这个就全了-easyarm2200 the entire CD-ROM content, including the ADS experiment, UCOS transplant, as well as in the experiment under uCOS, there are some software, with this on a wide
    2022-04-22 08:09:36下载
    积分:1
  • 一种有效的方法多
    贝叶斯参数的推到以及用支持向量机进行分类的有效的程序.非常实用-An effective approach for multi-concurrent fault diagnosis based on integration of fractal exponent wavelet analysis and neural networks is presented.The wavelet transform can accurately localizes the characteristics of a signal both in the time and frequency domains and in a view of the inter relationship of wavelet transform between fractal theory,
    2022-02-21 01:46:44下载
    积分:1
  • 用MATLAB实现的信号处理! 低通滤波器高通滤波器可以输出方波!...
    用MATLAB实现的信号处理! 低通滤波器高通滤波器可以输出方波!-MATLAB signal processing! Low-pass filter high-pass filter can output pulse!
    2023-07-05 13:25:03下载
    积分:1
  • CNC automatic programming system can be generated by the graphics drawing tool l...
    数控自动编程系统,可以通过所画的图形生成走刀路线,然后生成代码-CNC automatic programming system can be generated by the graphics drawing tool line, and then generate code
    2022-01-26 00:48:44下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载