From: FutureScalper on 17 May 2010 15:28 Hi, Using Swing, JRE 1.6 latest versions running under Java Web Start, not that it should make any difference... Problem is, my cursors sometimes do not revert to the standard mouse cursor shapes when they should do so. I can resize a JDialog and 99.9% of the time, there's no issue, but once the default cursor is lost, it retains some other shape and looks bad, although it works of course if you can figure out the "hot" pixel location on the alternate cursor shape. I've tolerated this issue for a long while, and am about to implement a watchdog cursor fixer task which knows about all of my JDialogs and fixes their cursors to the default cursor periodically. I already have to do this with my JFrames, as the cursor gets "permanently messed up" sometimes. I might have a "corner cursor" shape which persists. Making the window or dialog invisible and then visible again doesn't fix it. It's hard to use one of those cursors as a pointer, and it's ugly. So, do I NEED to implement this "watchdog cursor fixer" thread or not? It's not that it would be that difficult, just annoying. Anyone else have issues with Swing cursors? By the way, I have DirectX disabled, and am using only Java2D graphics on Windows. I have Nvidia graphics cards and 4 physical displays, so this isn't just on a single monitor system, not that it's relevant. It's a Core I7 system, but I've had this problem over the months and years with Swing. Thanks !!
From: John B. Matthews on 17 May 2010 21:55 In article <063fa871-3454-4cf0-8026-24dce8c722b1(a)s41g2000vba.googlegroups.com>, FutureScalper <futurescalper(a)gmail.com> wrote: > Using Swing, JRE 1.6 latest versions running under Java Web Start, not > that it should make any difference... > > Problem is, my cursors sometimes do not revert to the standard mouse > cursor shapes when they should do so. I can resize a JDialog and > 99.9% of the time, there's no issue, but once the default cursor is > lost, it retains some other shape and looks bad, although it works of > course if you can figure out the "hot" pixel location on the alternate > cursor shape. > > I've tolerated this issue for a long while, and am about to implement > a watchdog cursor fixer task which knows about all of my JDialogs and > fixes their cursors to the default cursor periodically. > > I already have to do this with my JFrames, as the cursor gets > "permanently messed up" sometimes. > > I might have a "corner cursor" shape which persists. Making the > window or dialog invisible and then visible again doesn't fix it. > It's hard to use one of those cursors as a pointer, and it's ugly. > > So, do I NEED to implement this "watchdog cursor fixer" thread or > not? It's not that it would be that difficult, just annoying. > > Anyone else have issues with Swing cursors? By the way, I have > DirectX disabled, and am using only Java2D graphics on Windows. > I have Nvidia graphics cards and 4 physical displays, so this isn't > just on a single monitor system, not that it's relevant. > It's a Core I7 system, but I've had this problem over the months and > years with Swing. JFrame#setCursor(int cursorType), inherited from Frame, is deprecated. Component#setCursor(Cursor cursor) has been reliable for me in maintaining the cursor over assorted JPanels on many platforms. In this example, RCInfo and RCView each have a distinct cursor controlled by a MouseListener's mouseEntered() and mouseExited() implementation. <http://robotchase.sourceforge.net/> -- John B. Matthews trashgod at gmail dot com <http://sites.google.com/site/drjohnbmatthews>
|
Pages: 1 Prev: Two Questions: JSpinner and datatype Next: installed Portable Thunderbird |