12/19/17

DrJava Font Size Problem

I'm helping my son learning Java. One of the first things to do when learning Java is picking an IDE. I like DrJava for its simplicity and small size. However, when I first run DrJava, its font size is way too small on my 4K monitor.

There are 2 ways to fix this - the easy way and the hard way.

The easy way first.
Click Edit:Preferences, then click "Display Options", change "Look and Feel" to the one that ends with "Plastic3DLookandFeel".  Do this on Windows only, for Mac and Linux, default "Look and Feel" is fine.
Click "Font" under "Display Options", change all fonts to double the original size:
Press "OK", then close DrJava then open it again.  Now the fonts should be big enough to read.

(The changes you make are actually saved in a configuration file .drjava in your home directory,  you can edit the file directly for changes, but it's not recommended)

Now the hard way.
For the "easy way", we just changed DrJava's default configuration preferences.  The hard way is to compile a DrJava program with these changes already made in the source code so we don't have to change preferences.

Clone the DrJava repository on github: https://github.com/DrJavaAtRice/drjava

Try to compile it first:
cd drjava/drjava
ant jar

You must have ant already installed.  If it's compiled OK, try run it:
java -jar drjava.jar
(You can just double click drjava.jar file too)

Open src/edu/rice/cs/drjava/config/OptionConstants.java for editing:
Change "Monaco-12" to "Monaco-24"; change "Monospaced-12" to "Monospaced-24";
chanage "dialog-10" to "dialog-20"; change "dialog-12" to "dialog-24".

Save the file then recompile (ant jar).  Now DrJava is "pre-configured" with big fonts.

You might say this "hard way" is pointless.  Why on earth would anyone want to do this? I agree.  But just maybe one wants to provide a "pre-configured" copy of DrJava to his students.  I just show one way to do it.  Another way is to write a .drjava configuration file upon installation.  This is way more complex. Besides, I'm using a standalone jar file, there's no installation to speak of.


19 comments:

  1. Please a video tutorial on this changing the font size in java in both method.
    As I am a student I cant understand
    The second process
    My Gmail Id (deva740640@gmail.com)
    Please send the tutorial

    ReplyDelete
  2. Great post!
    Thanks for sharing this list!
    It helps me a lot finding a relevant blog in my niche!
    Java Training in Chennai
    Java Training in Coimbatore
    Java Training in Bangalore

    ReplyDelete
  3. Thanks for taking the time to share this article here about the Java font size problem. Your article is very informative and nicely describes the solution of Java font size problem. codingbytes offers the Best Core Java Course in Delhi.

    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete
  5. I would like to thank you for the efforts you have made in writing this article. I am hoping for the same best work from you in the future as well..
    data scientist training and placement in hyderabad

    ReplyDelete
  6. Extraordinary post I should state and a debt of gratitude is in order for the data. Instruction is unquestionably a clingy subject. Be that as it may, is still among the main subjects within recent memory. I value your post and anticipate more.cloud computing course in patna

    ReplyDelete
  7. Thanks a lot for one’s intriguing write-up. It’s actually exceptional. Searching ahead for this sort of revisions.
    data analytics courses in hyderabad with placements

    ReplyDelete
  8. In the wake of perusing your article, I was astounded. I realize that you clarify it well overall. What's more, I trust that different perusers will likewise encounter how I feel in the wake of perusing your article.
    data scientist course in hyderabad

    ReplyDelete
  9. data analytics course in lucknow5/25/2022 10:37:00 AM

    Are you looking for a Data Science course that will aid you in your career growth. 360DigiTMG is the right place for you. Enroll now for a better tomorrow.

    business analytics course in lucknow.

    ReplyDelete
  10. You will catch artifact secrets used for totally Windows 7 styles and pick up by what method towards trigger Windows 7 through & starved of a produce important. Activate Windows 7 Ultimate

    ReplyDelete
  11. Reimage PC Repair 2023 Crack is one of the only programs of its type. Reimage is the best creation that wants to have Reimage License keys Reimage Plus License Key Free

    ReplyDelete
  12. Good Morning Wishes. We are enthralled to share with you a vast collection of special Good Morning Wishes for friends, family, and loved ones.Good Morning Wishes

    ReplyDelete
  13. Infotech Softnet is the best C++ institute in Janakpuri and caters to the needs of all the students. With a team of highly experienced trainers and a proven track record of success, we have earned a reputation as the best C++ institute in the area. Our comprehensive C++ courses are designed to cater to the needs of both beginners and advanced learners. We provide practical, hands-on training that enables our students to master the language quickly and effectively. Our state-of-the-art facilities and advanced teaching methodologies make us stand out from other computer training institutes in Janakpuri.
    Join Infotech Softnet Computer Education today and unlock your potential in C++. Whether you are looking to kickstart your career in programming or simply enhance your skills, we have a course for you.

    ReplyDelete
  14. Nice article.
    Also, check Java course in Pune

    ReplyDelete