Mouse Cursor Not Changing
I have the following:
panel =new JPanel(new BorderLayout());
tb = createToolBar();
p2 =new JPanel();
panel.add(tb, BorderLayout.NORTH);
panel.add(p2, BorderLayout.CENTER);
when a button is clicked in the toolbar i try to change the parents panel mouse cursor to the HAND_CURSOR.
//inside the toolbar class when a button is clicked
getParent().setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
...well the cursor is not changing. I know that when you set the cursor for a Container that all subcomponents will get that cursor if their cursor is null...otherwise it wont. So i recursively printed out the children components of the parent, as well as their comp.getCursor() and they all have the HAND_CURSOR...which is expected since I had just set it.
I also tried, recursively setting the cursor for the parent and all children to null
comp.setCursor(null);
...as i recursively set the cursor to null I printed out the result of comp.getCursor(). Sure enough it was always "java.awt.Cursor[Default Cursor]". So, according to the Component.setCursor documentation the cursor wont change for anything in the Container...since its subcomponents have non-null cursors.
Any ideas why it doesnt show up? or how to do it?

