How to change font for Java code in Eclipse
- Details
- Written by Nam Ha Minh
- Last Updated on 07 August 2019   |   Print Email
Sometimes we need to change font style for Java code in Eclipse, e.g. increasing font size for more readability. This can be done easily in Eclipse, by going to menu Window > Preferences… In the Preferences dialog:
- Select General > Appearance > Colorsand Fonts (1) in the left pane.
- Select Java Editor Text Font (2) in the center.
- Click Edit… button in the right.
Now, in the Font dialog you can change font name, font style and font size:
Click OK, the Preview pane in the Preferences dialog lets you see the changes before applying it:
When the preview suits your need, click OK to close the Preferences dialog, and then the changes take effect immediately. Here’s an example screenshot shows text in a Java code editor has bigger font than usual:
When you want to go back to the default setting, go to the Preferences dialog again, and click Reset button for Java Editor Text Font in Colors and Fonts setting:
Other Eclipse Tutorials:
- How to use Eclipse IDE for Java EE Developers
- How to create, build and run a Java Hello World program with Eclipse
- How to generate Javadoc in Eclipse
- How to create WAR file for Java web application in Eclipse
- How to create JAR file in Eclipse
- How to pass arguments when running a Java program in Eclipse
- How to create Java web project with Maven in Eclipse
- 25 Eclipse Shortcut Keys for Code Editing
- How to add custom Ant build script to Eclipse project
- How to Add Copyright License Header for Java Source Files in Eclipse
Comments
I was struggling with this since I have old version of Java and it was not happening with ctrl +/-. THANKYOU SO MUCH ????????