Change mouse cursor in applet
Is it possible to change mouse cursor, from the arrow into an icon, when the mouse cursor is over an applet in browser?
spekulanten wrote:
Is it possible to change mouse cursor, from the arrow into an icon, when the mouse cursor is over an applet in browser?Have you tried it? (I think it requires the applet to have focus)
Similar Messages
-
Problem with i-Planet and change mouse cursor
Hello, I know how change mouse cursor using Toolkit.getdefaultToolkit().createCustomCursor(Imagen,new Point(0,0),String) and setCursor. It works in a local applet but it doesn`t in my aplication. This aplication attach a i-Planet web server and displays the following error:
java.lang.NoSuchMethodError: java/awt/Toolkit: method createCustomCursor(Ljava/awt/Image;Ljava/awt/Point;Ljava/lang/String;)Ljava/awt/Cursor; not found
Where's the problem? Maybe an incorrect jdk version. I don�t think so because I use 1.3.1 version and this method works since 1.2 version.
Thank you for all.hi,
iplanet has its own jar files in \Netscape\Server4\bin\https which contains the same jar files as it is in jdk dir...so importing ur jar files thru the environment might create a similar problem -
Changing Mouse Cursor with a Thread
Hi all
I am trying to change mouse cursor inside a thread for a graphical program so that the GUI does not freeze while new image is calculated and shown on the main frame. I have the below code. It works altough not the way it should. Forexample, when I press accelarator keys to show an image (ctrl+D) I see strange characeters on the frame and they disappear when the image is shown. Also I use scroll pane to show the images but when I use this thread it does not display scroll bars when the image does not fit into the viewing area (a panel). If I don't use this thread scroll bars apeear as they should. I could not find what is causing these strange behaviours. Also after image calculaed and shown on the screen, the thread should be terminated, right? But how? I could not find exact info on this. Any ideas on these? Thanks.
pp = new PixelPanel();
jsp.setViewportView(pp);
pp.addMouseMotionListener(this);
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
thread1 = null;
thread1 = new Thread("thread1")
public synchronized void run()
try
pp.showGrayImage();
finally
setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
thread1.start();I am trying to change mouse cursor inside a thread
for a graphical program so that the GUI does not
freeze while new image is calculated and shown on the
main frame.What does the mouse cursor have to do with your lack of multithreading and you doing all the work in the AWT thread?
I have the below code. It works altough
not the way it should. Forexample, when I press
accelarator keys to show an image (ctrl+D) I see
strange characeters on the frame and they disappear
when the image is shown.Probably because it can't repaint because you're hogging it with painting work.
Also I use scroll pane to
show the images but when I use this thread it does
not display scroll bars when the image does not fit
into the viewing area (a panel). If I don't use this
thread scroll bars apeear as they should. I could not
find what is causing these strange behaviours.Probably because it can't repaint because you're hogging it with painting work.
Also
after image calculaed and shown on the screen, the
thread should be terminated, right? But how? I could
not find exact info on this. Any ideas on these?A thread executes its run method and just stops when it's done. -
Programmatically change mouse cursor size
LV 8.5 on Windows XP
Is there a way to change the size of the mouse cursor (custom or otherwise) programmatically? I can load custom cursors using included vi's but can't find a way to change the size - the cursor vi's are locked so I don't know what is going on behind them.
Thankssmercurio,
I had found that thread but the API example is written in 5.1, unfortunately I have wiped this machine several times since running 7.1 and would rather not reinstall if I can avoid it. (As I understand it 7.X can open the 5.X and THEN I can open in 8.X)
I will look around for a machine running 7 and go from there but any other suggestions would be appreciated.
Thanks again!
-Jolt -
Change mouse cursor over graph cursor.
Is there a way to change the mouse cursor as it moves over graph cursors when using trackmode TrackDragCursor? To indicate that you can position the cursor.
You could accomplish this with the graph's CursorMouseMove event. For example, create a new project with the NI Measurement Studio AppWizard and follow these steps:
Add a graph to the dialog. Right-click on the graph in the dialog editor, click "Class Wizard ...", click the Member Variables tab and add a member variable for the graph called m_graph. Click OK.
Right-click on the graph in the dialog editor and click on "Events ...". Add an event handler for CursorMouseMove called OnCursorMouseMove and add an event handler for PlotAreaMouseMove called OnPlotAreaMouseMove. Click OK.
Go to the header file for your dialog class and add this to the bottom of the class declaration:
private:
bool m_cursorChanged;
HCURSOR m_defaultCursor;
HCURSOR m_crossCursor;
Go to the source file for your dialog class and add this to the end of the
OnInitDialog method:
m_graph.TrackMode = CNiGraph::TrackAllEvents;
m_graph.Cursors.Add();
m_cursorChanged = false;
m_defaultCursor = ::LoadCursor(NULL, IDC_ARROW);
m_crossCursor = ::LoadCursor(NULL, IDC_CROSS);
Add this to your CursorMouseMove event hander:
if (!m_cursorChanged)
:etCursor(m_crossCursor);
m_cursorChanged = false;
Add this to your PlotAreaMouseMove event handler:
if (m_cursorChanged)
:etCursor(m_defaultCursor);
m_cursorChanged = true;
Run the application. You should see that the mouse cursor changes to a cross when you mouse over the cursor.
Hope this helps.
- Elton -
[Solved] Change mouse cursor in Awesome.
I can't change the mouse cursor in Awesome. I added "Xcursor.theme: aero-drop" in my .Xdefaults and "xrdb ~/.Xdefaults" in .xinitrc, but the cursor is still the default black one. I searched everywhere and I couldn't find how to change it. Can you give me a hand? Thanks.
Last edited by Boris Bolgradov (2009-09-10 15:38:52)It looks like the package in aur is messed up, It isn't extracting the themes and these are dead links to the tar.gz's.
navi>> sudo pacman -Ql xcursor-aero <<~
xcursor-aero /usr/
xcursor-aero /usr/share/
xcursor-aero /usr/share/icons/
xcursor-aero /usr/share/icons/aero-drop.tar.gz
xcursor-aero /usr/share/icons/aero-extra-large-drop.tar.gz
xcursor-aero /usr/share/icons/aero-extra-large.tar.gz
xcursor-aero /usr/share/icons/aero-large-drop.tar.gz
xcursor-aero /usr/share/icons/aero-large.tar.gz
xcursor-aero /usr/share/icons/aero.tar.gz
you could manually extract the aero-drop.tar.gz into your ~/.icons folder and it should work. -
Keep mouse cursor in applet box
Hi,
I could really use some help with this one. I need to prevent my mouse cursor from being able to leave the applet box. I have treid doing this with final int's setting the limit for the max and min range of mouse movement but no joy. Please help.....I'm just a beginner!!I dont know anything about JNI yet but I will take a look though. I also think I need to explain again cos I really said it all wrong. What I meant was, I'm trying to create a situation where my existing applet which has a small box within it that takes char arguments and displays one char at a time, and can move it around the applet box with the cursor keys; can not go outside of the applet box. I am now almost there I think, I have just missed something out somewhere.
Sorry for my lack of clarity, I ought to learn english first I think... -
IDCS5 Win - changing mouse cursor
At times I have code that processes a lot of data in ways that are not amenable to progress bars (for example, saving a single, large file to disk). During those times I would like to change the cursor from its standard arrow to another standard such as an hourglass. I see lots of general documentation on changing cursors that are specially made, but nothing that describes the process for changing from one standard cursor shape to another. Nor is there any sample code/snippets that demonstrate the procedure, as far as I could find. Does anyone have a suggestion where to look or what boss to use to change a mouse cursor from one icon to another?
TIA!
JohnI took a quick look at the header file and it all seems waay too simple. Are you sure you're talking InDesign here? (grin).
Thanks Dirk. This is what I was looking for.
R,
John -
Change Mouse Cursor Inside JTextPane
Hello Everyone,
I am trying to change the mouse cursor of a specific text of a JTextPane to:
setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));This specific text is a hyperlink which its color is blue and it is underlined, so I want to have the mouse cursor changed to make clearer that you can click on it.
I thought about trying to track the mouse position inside the JTextPane until it reachs the text position but I am not aware of any class that provides this feature. Does anyone know or have another ideia?
Any help is appreciated,
Thanks in advance
Edited by: ZeroTodd on Aug 10, 2010 6:26 AMThis specific text is a hyperlink which its color is blue and it is underlined, so I want to have the mouse cursor changed to make clearer that you can click on it.That's the default behavior (in the default Metal LaF, at least) when you setEditable(false). And IMO it doesn't make much sense to change the cursor or allow hyperlink navigation when the text pane is editable.
db -
Showing a "Please wait..." window / Changing mouse cursor to hourglass
Can one of the following be done using javascript:
1) Show a "Please wait" window (when using synchronous SOAP requests) with the ability to "hide" it
2) Change the mouse cursor to hourglass
I went over the JS API and found nothing, any ideas?Was the PDF opened within a web browser and was the PDF on a web server?
-
Change mouse cursor appearence in script
Is it possible to change the appearance of the mouse cursor in a script?
A couple of the scripts I've created takes a little time to execute, so I'd like to change the cursor to the hourglass while waiting for the script to finish (and then change it back to normal at the end of the script).
Are the other ways of letting the user know that a little patience is required?Hi Salte,
The following commands show a progress display in the status bar:
Call AutoLoopInit()
Call Pause(10) 'Replace this line by your time-consuming task
Call LoopDeInit()
Call Pause(5) 'Just to see what happens when the script stops
In the user dialog boxes you could use the method BeginWaitCursor to display the mouse cursor as an hourglass.
Hope this helps,
Ralf -
Change mouse cursor to pointer
Hello!
I have an Image control that I use to perform an action on
click.
How can I make the mouse cursor change to pointer on
mouseOver and back to default on mouseOut, please?
Thank you!Assuming you're talking about the hand-pointer cursor, you
need to set three properties (useHandCursor, mouseChildren and
buttonMode), as the attached example shows.
If you want to use a cursor besides the default pointer,
hand-pointer or busy cursor, then you need to dig further into
using the CursorManager. It's a little bit of extra work but it's
not too bad;
null
see
the LiveDocs entry on setting and removing cursors
Hope that answers your question.
- Chris -
Change Mouse Cursor with JTabbedPane
Case:
I have a JTabbedPane with many tabs
Need:
i want to change the mouse cursor when i want to select one of my tabs
Problem:
I want to know how i add this mouse event on the tab only not to whole tabbedpane
Thanks,I don't think that you need events at all. If you have a JPanel that is your tab, the just do.......
panel.setCursor(new Cursor(Cursor.HAND_CURSOR));
Then whenever the mouse is over that panel, you will have the cursor that was defined. You can set the cursor on an Component. -
How To Change Mouse Cursor Icon To Hand And Click Middle Of Player To Pause In Strobe Media Playback
Hello,
Thank you for providing a platform where uses can pose questions to Adobe employees. This certainly helps us all cut right through it.
Similar to YouTube's player (as well as many others), I was wondering if it is currently possible for users to enable functionality on Strobe Media Playback to change the mouse cursor to a hand/point cursor upon hovering over Strobe Media Playback's buttons (such as pause, the volume controls and that initial large centered middle play button),
And, whether or not it is currently possible to enable functionality to pause/play videos merely by clicking the middle of the video screen (within the normal view mode as well as the full screen mode). Again, with YouTube, Vimeo, JW Player, and many others, such functionality is currently built-in by default.
I look forward to any advice you are able to provide. Thanks again for providing this discussion platform for users.
- C.R.Hi, thank you for your suggestions and for the interest in our player.
The full area click issue is an older one, tracked at http://bugs.adobe.com/jira/browse/ST-156 . Unfortunately, it will not be fixed in this release.
The hand cursor issue is now tracked at http://bugs.adobe.com/jira/browse/ST-331 - thanks for suggesting it! -
How to change mouse cursor during drag and drop
Hi Guys,
Iam performing a Drag and drop from Table1(on top of the figure) to Table2(down in the figure).
see attached figure
http://www.upload-images.net/imagen/e80060d9d3.jpg
Have implemented the Drag and drop functionality using "Transferable" and "TransferHandler"using the java tutorial
http://java.sun.com/docs/books/tutorial/uiswing/examples/dnd/index.html#ExtendedDndDemo
Now My problem is that ,I want to make the 1st column in Table2(ie: Column2-0) not to accept any drops so that the cursor appears like a "No-Drop" cursor but with selection on the column cell during a drop action.
Also when I move my cursor between "column2-0" and "column2-1",want to to have the "No-Drop" and "Drop" cursor to appear depending on the column.
How can I achieve it using the TransferHandle class.Dont want to go the AWT way of implementing all the source and target listeners on my own.
Have overridded the "CanImort" as follows:
public boolean canImport(JComponent c, DataFlavor[] flavors) {
JTable table = (JTable)c;
Point p = table.getMousePosition();
/* if(p==null)
return false;
int selColIndex = table.columnAtPoint(p);
if(selColIndex==0)
return false;*/
If I execute the above commented code,The "No-Drop" Icon appears in "column2-0",but no cell selection.Also If I move to "column2-1",which is the 1st column,Still get the "No-Drop" Icon there,also with no cell selection.
for (int i = 0; i < flavors.length; i++) {
if ((DataFlavor.stringFlavor.equals(flavors))) {
return true;
return false;
Thanks in advance.....
Edited by: Kohinoor on Jan 18, 2008 3:47 PMIf you found the selection column based on the mouse pointer, then based on the column, you can set the cursor pointer as any one as below :
setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
setCursor(new Cursor(Cursor.HAND_CURSOR));
Maybe you are looking for
-
Have anyone faced such an issue? Please help.
-
IPod Touch No Longer Syncs After Upgrade to 10.8.3
I recently upgraded my computer from OSX 10.5 to 10.8.3. But while my iPad seems to sync fine, my iPod touch no longer syncs and it is not recognized by the Apple store. Please help!
-
Lightroom 5 to edit in Photoshop CS-5
Whn I edit my photos in Lightroom 5 and after i am done I send the edited image to Photoshop SC-5 for further adjustments, the previous Lightroom adjustments are NOT showing up in Photoshop SC-5 . Why? With other words the Lightroom edit is not taken
-
Out of Memory Error when Saving SequenceFile generated using API
I am currently developing an application that creates a SequenceFile using .NET 4.0, C# (2010), Windows 7 Pro x64, Dual Core 2.5 GHz, 3.0Gb Memory. Using the API EngineClass, I create a complete SequenceFile based on user/file inputs and then save i
-
How can I add an event to my calendar that occurs every third day?