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

How to set indentation options on NetBeans6.0

 
Campbell Ritchie
Sheriff
Posts: 48909
58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had an e-mail about a week ago saying that NetBeans 6.0 was available; I usually use Eclipse but thought I would try NetBeans again. It seems to default to the sort of identation where you get the { at the end of the line; you can even get lines like thisI found the window where you can choose the Java indentation engine, but couldn't seem to alter its options. How can you get { to appear on a line on its own, etc?
 
Joachim Rohde
Ranch Hand
Posts: 433
Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tools / Options / Java Code / Tab Formatting / Category "Alignment and Braces" / Tab Braces Placement / choose 'New Line' in the three dropdown menus.
And with Alt+Shift+F you can reformat your code so that effects takes place.
 
Campbell Ritchie
Sheriff
Posts: 48909
58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you. That works nicely.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic