• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Disable selection from the JEditorPane

 
Khaled Mahmoud
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
maybe this is all you need to do

editorPane.setEnabled(false);
editorPane.setDisabledTextColor(Color.BLACK);
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic