This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • 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