DrJava: How to keep the line numbers and footer from being printed?

Posted on 2006-10-25
Medium Priority
Last Modified: 2010-05-18
Dear experts:

Hi again!

I am trying DrJava recently. But I got a problem:
The problem is that the line numbers and the footer is printed with the code. I went to Edit > Preferences and checked all options over and again, but I could not find anything that may be of help to change it.


Question by:duta
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2

Expert Comment

ID: 17829855
Hi Duta,
Sufficient time has passed, that either you have solved your problem and this Q should be closed or you still do not have an answer.
I use DrJava regularly since I do not have the room in
my computer to hold the JBuilder type that has all the whistles and pop up ads that come with it. And yes the option to stay within the DrJava program and print out the program I am writing >>> with out the line numbers and footer is not possible. Even if I resort to a copy of the text and  paste it in WordPad the footer the title and page numbers are inserted.

However, I have a second IDE: GEL, that in some ways is superior to DrJava. It is free is reasonably small and it is available for download.


It has features such as what you want in the way of printing>>> by indicating preferences inside of "print preview"
GEL also has code "completion features" that enable the user to select by highlight what may be the possible next thing to type and a documentation of the item selected.  
In the end the "free" java IDEs that icluding BlueJ are not fully complete in every wish list item.

Hope that this helps


Author Comment

ID: 17830081
TO: delphi3:

Thank you so much for your kidn tip.
Because my department uses DrJava, I may need to stay with DrJava.

Thanks a lot!


Accepted Solution

delphi3 earned 2000 total points
ID: 17833048
Hi Duta,
In a classroom setting, the line work aids in the discussion/lesson: tracking begins and ends, tracing jump to or as they used to say "goto".  And that is the reason for the existence of this DrJava teaching learning aid. Yet, I have encountered some college profs that use GEL for their own work for the reason of more in the teaching prep side. But GEL has a limited life span as the creators of it hit a wall or ran out of development money: hence the date of the last revision.

 I suppose that if you do not make any  changes then I would go for  alternate solutions:
1. Get the people at Rice University CS Dept to move that improvement up to the front of the list and it may be in the next revision. They make those "beta" and "stable" versions about every six to 9 months with new revisions.

2. Have an office clerk learn how to snip and clip the DrJava copy from the printer so as to cut off the line numbers and what ever else. Give the person a raise of 50 cents an hour for" intelligent handling of the java printer output.... just before it goes into the fax or photocopier.

3. Get some tape and cover what you don't want to show. A bit messy if the copier takes the tape with it by an "oops".

4. Make a "mask" to cover the unwanted locations on the paper.....place it just where the printer puts the unwanted items all the time.  Then into the photo copier.

5. I was thinking that I might try my hand at writing a program that would load the saved java text out and print it. The commands for printers are stored on the IE page. Then next thing would be to store the page in the html format. ....... Just thinking to myself......


Expert Comment

ID: 17833592
Hi Duta,

Observation by me: Printing the html page shows it as having a header and a document location.

Another alternative to the list above:
6. Save the DrJava text as "Whatever.java" in the normal sense. Then rename the file saved file from "Whatever.java" to  "Whatever.rtf".  Then use the right mouse button option to select "print" of the unopened .rtf doc.  My print copy looks pretty good as long as the length of lines of java program original text do not exceed the limits of the page before the normal wrap around in the print. The  output printed page does not have the source, line numbers or the header, just the program text.

Observation: if you "open" it in the rtf format and print it, it will do some wrap around that looks a bit ugly  unless you reset the margins of the .rtf doc.



Author Comment

ID: 17833993
TO: delphi3:

Thank you so much for your kind, thoghtful tip and insight.

I will take time to try all of your tips.



Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
The viewer will learn how to implement Singleton Design Pattern in Java.
Suggested Courses
Course of the Month15 days, 9 hours left to enroll

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question