-
Java自定义鼠标光标
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); //窗口可视
- 2022-03-06 15:35:47下载
- 积分:1
-
Verilog实现的LCD控制器,在实现了LCD接口以及相关的控制时序。...
Verilog实现的LCD控制器,在实现了LCD接口以及相关的控制时序。-Verilog implementation LCD controller
- 2023-09-09 00:05:03下载
- 积分:1
-
files of c language,learn form base,lead you to be well up to application of c l...
c语言之文件篇,从基础学起,让你彻底精通c语言的应用。-files of c language,learn form base,lead you to be well up to application of c language
- 2022-01-25 17:36:48下载
- 积分:1
-
这是用java编写的一个简单的计算器的源码以及编译后生成的文件...
这是用java编写的一个简单的计算器的源码以及编译后生成的文件-This is a java prepared by the simple calculator and the compiled source files created in the
- 2022-05-20 08:39:13下载
- 积分:1
-
关于SVM学习的两个ppt。内容通俗易懂,适合初学者看看,供大家参考。...
关于SVM学习的两个ppt。内容通俗易懂,适合初学者看看,供大家参考。-On the SVM learning 2 ppt. The contents of user-friendly, suitable for beginners look for your reference.
- 2022-04-22 08:32:14下载
- 积分:1
-
IIS5.0 to install the required system files appconf.d
IIS5.0安装所需的系统文件 appconf.d-IIS5.0 to install the required system files appconf.d
- 2022-09-01 18:25:03下载
- 积分:1
-
artificial intelligence. modeling of associative memory. Source
artificial intelligence. modeling of associative memory. Source
- 2022-05-30 03:28:43下载
- 积分:1
-
这是一个很好的游戏啊 ,欢迎大家来下在和上穿关于这方面的东西啊...
这是一个很好的游戏啊 ,欢迎大家来下在和上穿关于这方面的东西啊-This is a good game ah, welcoming everyone to come in and under to wear this on the things ah
- 2022-01-26 07:01:43下载
- 积分:1
-
dos下用c&c++编写的mp3播放源码!
flash menu
- 2022-01-26 06:22:24下载
- 积分:1
-
Porting the Simple Sockets Library Dr. Charles E. Campbell, Jr.
Porting the Simple Sockets Library Dr. Charles E. Campbell, Jr.
- 2023-07-12 15:20:03下载
- 积分:1