wood burning stoves*
The moose likes Swing / AWT / SWT and the fly likes Disable selection from the JEditorPane Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Disable selection from the JEditorPane" Watch "Disable selection from the JEditorPane" New topic
Author

Disable selection from the JEditorPane

Khaled Mahmoud
Ranch Hand

Joined: Jul 15, 2006
Posts: 361
I am using a JEditorPane in my Sun Certified Java Developer programming
assignment.
I need to disable selection of text from the JEditorPane because i use the JEditorPane to display information to the user.

Thanks in advance.


SCJP, SCJD,SCWCD,SCDJWS,SCEA 5 MCP-C#, MCP-ASP.NET - http://www.khaledinho.com/
Life is the biggest school
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
maybe this is all you need to do

editorPane.setEnabled(false);
editorPane.setDisabledTextColor(Color.BLACK);
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Disable selection from the JEditorPane
 
Similar Threads
JTable
Multiple text selection in JTextArea
JEditorPane disabling Line Wrap
Disable Copy in JEditorPane
Selection color and selected text color - Urgent