I tried that before, and it caused endless loops with some configurations, freezing Jaxe. I tried many other ways to get the focus in the text pane when the window is activated, but all triggered some kind of JVM bug. After spending years on that issue, I had to give up. Maybe this would work with recent versions of Java, but I would have to do lots of testing to find out on what version it works...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In my jdk1.5.0_10 for windows this works good, but i rewrote frame completely.
It is strange to listen that. This is too common actions to have bugs. I think that there is some code in textPane or jaxeFrame or somewhere else which just creates an infinite loop.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I wanted to say that we met such problems in powerbuilder (not java, but ...) In all cases when such problems occured there was some peaces of code which rival for focus.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes. This error occures when we open a second frame. Then that windows start to switch one to another and back again. So I move the code into the method which is called in openDocument and newDocument methods. And now everything works good.
Something like that:
I tried that before, and it caused endless loops with some configurations, freezing Jaxe. I tried many other ways to get the focus in the text pane when the window is activated, but all triggered some kind of JVM bug. After spending years on that issue, I had to give up. Maybe this would work with recent versions of Java, but I would have to do lots of testing to find out on what version it works...
In my jdk1.5.0_10 for windows this works good, but i rewrote frame completely.
It is strange to listen that. This is too common actions to have bugs. I think that there is some code in textPane or jaxeFrame or somewhere else which just creates an infinite loop.
I wanted to say that we met such problems in powerbuilder (not java, but ...) In all cases when such problems occured there was some peaces of code which rival for focus.
Yes. This error occures when we open a second frame. Then that windows start to switch one to another and back again. So I move the code into the method which is called in openDocument and newDocument methods. And now everything works good.
Something like that:
removeComponentListener(this);
addComponentListener(this);
validate();
jaxeTextPane.requestFocus();
}
Sory.
It is not work
That was mirage. :-(
It is a shamanism. :-(
Now it is works after:
attente.dispose();
setCursor(null);
toFront();
jaxeTextPane.requestFocus();
}
Well. I will examine this again tomorow morning :-D