Using a JLabel for the right header or footer with right justified text, text runs over the right edge. Why?
This was a Java bug (see “Known Problems”), since fixed in JDK 1.5. It primarily occurred for small, size=-3, text and for SansSerif (= Arial = Helvetica) font. Workarounds for earlier JDK’s include: 1) use bigger font size, 2) use Serif font, or 3) if you need a sans serif font, try alternatives such as Lucida Sans.
Related Questions
- When I take print outs of the converted document, the text gets truncated from the left and right margins. How can I make sure this does not happen?
- Using a JLabel for the right header or footer with right justified text, text runs over the right edge. Why?
- Can I use page numbering and/or date/time formatting in a JLabel header or footer?