Java Swing JEditorPane and Screen Readers

╄→尐↘猪︶ㄣ 提交于 2020-01-16 00:33:08

问题


I've been looking for the last few days and can't find an answer anywhere. I'm trying to make an accessible IDE in Java Swing. The only thing I'm having problems with, is emulating behavior that happens in other text text editors.

I want the screen reader (JAWS, in particular) to read whatever is in the selected line of the text area (not like highlighted, just wherever the cursor is - that whole line).

If I try this in Eclipse, or even notepad, whenever I use the arrow keys to move the text cursor, the screen reader immediately reads whatever is on that line. It does not do this in my program, which I've even tried to simplify down to a simple JFrame with a JEditorPane(tried a simple JTextArea as well).

Is there a particular listener, or something I have to implement accessibility-wise, or idk what else, in order to create this functionality? I apologize if my question is confusing. I'm still trying to learn how to actually make the accessibility stuff work. If there's anything else I can clarify please let me know.


回答1:


Have you looked into using the Java Access bridge (download and install it), as this is necessary for screen readers like JAWS to read java applications. Java access bridge info can be found here. http://www.oracle.com/technetwork/java/javase/tech/index-jsp-136191.html



来源:https://stackoverflow.com/questions/10051006/java-swing-jeditorpane-and-screen-readers

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!