Hi,
i tried this and was able to get it working ..
i dont know what u have done,but here the code which is working and was able to change the Cursor ,once it was on a button.
take a look at it... as for the second part, i hadnt tried it.i will take a look at it..
import java.awt.*;
import java.awt.event.*;
import javax.swing .*;
public class textpane extends JFrame
{
JTextPane textpane;
JButton button;
Container cont;
textpane()
{
cont = getContentPane();
cont.setLayout(new FlowLayout());
textpane = new JTextPane();
button = new JButton("added to textpane");
textpane.insertComponent(button);
button.addMouseListener(new mouselistener());
cont.add(textpane);
System.out.println(Cursor.HAND_CURSOR); // 12
System.out.println(Cursor.N_RESIZE_CURSOR); //8
}
class mouselistener extends MouseAdapter
{
public void mouseEntered(MouseEvent me)
{
Cursor c = new Cursor(8);
button.setCursor(c);
}
}
public static void main(
String a[])
{
textpane tp = new textpane();
tp.setSize(300,300);
tp.setVisible(true);
}
}