javaGui 如何让鼠标在窗口边缘的时候移动面板 窗口800*700的面板是3200*2400的一张地图我想实现的效果就是跟魔兽里的一样当鼠标到达窗口边缘的时候 地图就开始移动大家提点好意见 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 懂A*算法的可以加我QQ942555939 谢谢了! 鼠标就不可能不在图片范围窗口才800*700里面一个PANEL 3200*2400 是一个地图我怎么取鼠标的也取不到当前窗口的坐标都是PANEL的坐标 SwingUtilities 提供的工具方法:static Point convertPoint(Component source, int x, int y, Component destination) 将 source 坐标系统中的点 (x,y) 转换到 destination 坐标系统。 static Point convertPoint(Component source, Point aPoint, Component destination) 将 source 坐标系统中的 aPoint 转换到 destination 坐标系统。 static void convertPointFromScreen(Point p, Component c) 将一个点从屏幕坐标转换到组件的坐标系统 static void convertPointToScreen(Point p, Component c) 将一个点从组件的坐标系统转换到屏幕坐标。 static Rectangle convertRectangle(Component source, Rectangle aRectangle, Component destination) 将 source 坐标系统中的矩形 aRectangle 转换到 destination 坐标系统。 有没有方法:将 source 坐标系统中的矩形 aRectangle 转换到 destination 坐标系统的指定位置? 求用JAVA编写的一箭穿双心的代码? 如何设置网格像素大小 高分下无勇夫呼?求MP3转MID程序例子!这是第4个100分的帖子 怎么减慢我的机器的速度? 请教? jar包 提示outofmemoryError:java heap space 这是什么错?能看出来么?Help!! 一个奇怪的java线程问题。 很困惑??? 指定初始和目标状态的汉诺塔解法 好心人帮我看下这一小段代码是怎么回事,想不通啊. 在main方法中开启线程与@Test中开启线程
窗口才800*700
里面一个PANEL 3200*2400 是一个地图
我怎么取鼠标的也取不到当前窗口的坐标都是PANEL的坐标
SwingUtilities 提供的工具方法:
static Point convertPoint(Component source, int x, int y, Component destination)
将 source 坐标系统中的点 (x,y) 转换到 destination 坐标系统。
static Point convertPoint(Component source, Point aPoint, Component destination)
将 source 坐标系统中的 aPoint 转换到 destination 坐标系统。
static void convertPointFromScreen(Point p, Component c)
将一个点从屏幕坐标转换到组件的坐标系统
static void convertPointToScreen(Point p, Component c)
将一个点从组件的坐标系统转换到屏幕坐标。
static Rectangle convertRectangle(Component source, Rectangle aRectangle, Component destination)
将 source 坐标系统中的矩形 aRectangle 转换到 destination 坐标系统。
将 source 坐标系统中的矩形 aRectangle 转换到 destination 坐标系统的指定位置?