Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to copy code

 
dark vader
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am a beginner and am interested in trying the code in many examples,but when I copy and then paste to 'TextPad' the code looses all formating. Can anyone suggest how I paste to my test editer so that I don't loose the Java formatting?
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if you are talking about the many examples posted here (and other forums):
copy/paste the text into word first, then copy/paste from word to your editor
or
use mozilla as your browser - it preserves the formatting
 
Marilyn de Queiroz
Sheriff
Posts: 9066
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch, Dark! Please adjust your display name to meet the JavaRanch Naming Policy.
You can change it here.

Thanks!

I have run into this problem mostly when I'm copying code from an html page. To copy code (from a forum here), you can click on the quote marks and copy the code. Just remember to hit the back button when you're done copying the code. To copy code from another web page, you can click on "View" "Page Source".
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic