Cursor in Netbeans
Sorry if this is not the best place to ask about IDEs, but...
I'm having a problem regarding Netbeans and a custom cursor.
When I use Eclipse 3.0, the cursor displays as expected. In Netbeans, however, the same code makes the cursor disappear when it should be set over a component:
URL imgURL = component.class.getProtectionDomain().getCodeSource().getLocation(); /* Used to check if local directory is the expected one, and indeed it is in both IDEs */
Toolkit toolkit = Toolkit.getDefaultToolkit();
ImageIcon iconOpenHand = new ImageIcon("images/openHand.gif");
Image imageOpenHand = iconOpenHand.getImage();
Cursor openHand = toolkit.createCustomCursor(imageOpenHand, new Point(15, 15), "openHand");
If there's a better way to do it, please tell me. Thanks...
You shouldn't cheat on your IDE with another IDE, otherwise your just asking for trouble and sooner or later you're going to have to choose one over the other. The longer you leave your decision, the harder it will be
I'm not cheating... I use only Eclipse, but my boss wants me to show it in Netbeans, because there's no Eclipse in his network (I don't use Netbeans because it runs too slow in my machine). He thinks it's just too weird it works on one IDE and not on another, after all, both are compiled using J2SE 1.4.2... or is there something else I don't know?
By the way, why are there such problems between both IDEs? I'm not using any specific resource... so everything was supposed to work in both... If there's a reference to the underlying system, please tell me. If it doesn't work, I have to at least explain my boss why.
Today I tried using the prompt java compiler without and IDE.... so I compiled and executed it, and no cursor appeared over the component.
Then, I added a debug line to print the cursor (using getCursor()), to check if it was null. When I ran it again, the cursor appeared magically! Worse than that, I removed the line and the cursor would still appear... like if the bug had been magically fixed.
Does anyone know anything like this? If it's a java bug, or a Windows incompatibility issue?...
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL