Topic: 请问如何在Swing中改变鼠标外观呢?

  Print this page

1.请问如何在Swing中改变鼠标外观呢? Copy to clipboard
Posted by: szydxx
Posted on: 2004-08-25 16:16

小的想改变Swing中鼠标外观,却不知如何做望高手指点

2.Re:请问如何在Swing中改变鼠标外观呢? [Re: szydxx] Copy to clipboard
Posted by: ljy0000
Posted on: 2004-09-01 09:01

import javax.swing.*;
import java.awt.*;

/**
* @author <a href="mailto:youmail@yourdomain.com">yourname</a> Date: 2004-9-1
*/
public class myFrame extends JFrame
{
public myFrame()
{
setCursor(new Cursor(Cursor.WAIT_CURSOR));
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setSize(600,400);
}
public static void main(String[] args)
{
new myFrame().show();
}
}

3.Re:请问如何在Swing中改变鼠标外观呢? [Re: szydxx] Copy to clipboard
Posted by: 爱如泣血
Posted on: 2004-09-14 18:31

不知除了WAIT_CURSOR外还有什么外观?

4.Re:请问如何在Swing中改变鼠标外观呢? [Re: szydxx] Copy to clipboard
Posted by: 爱如泣血
Posted on: 2004-09-14 18:41

static int CROSSHAIR_CURSOR
The crosshair cursor type.
static int CUSTOM_CURSOR
The type associated with all custom cursors.
static int DEFAULT_CURSOR
The default cursor type (gets set if no cursor is defined).
static int E_RESIZE_CURSOR
The east-resize cursor type.
static int HAND_CURSOR
The hand cursor type.
static int MOVE_CURSOR
The move cursor type.
static int N_RESIZE_CURSOR
The north-resize cursor type.
protected String name
The user-visible name of the cursor.
static int NE_RESIZE_CURSOR
The north-east-resize cursor type.
static int NW_RESIZE_CURSOR
The north-west-resize cursor type.
protected static Cursor[] predefined

static int S_RESIZE_CURSOR
The south-resize cursor type.
static int SE_RESIZE_CURSOR
The south-east-resize cursor type.
static int SW_RESIZE_CURSOR
The south-west-resize cursor type.
static int TEXT_CURSOR
The text cursor type.
static int W_RESIZE_CURSOR
The west-resize cursor type.
static int WAIT_CURSOR
The wait cursor type.
还有这些,呵呵.

5.Re:请问如何在Swing中改变鼠标外观呢? [Re: szydxx] Copy to clipboard
Posted by: DengHT
Posted on: 2004-09-17 14:56

查查sun关于java的api就可


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923