This page contains
LabelTest.class
(developed using IBM Visual Age)
and LabelTest2.class
(modified to color the objects).
They should both display 4 lines of text.
(The first one does when displayed using Visual Age.)
- In MS IE 4.47, IE 4.72. and IE 5.00, 2 lines of text are displayed,
but 3 lines are printed.
Also the \n is rendered as a verticle bar instead of a line break
(both printed and on-screen).
- Netscape 3.02, 4.05, and Communicator 4.01a display nothing
(but a gray box) and print nothing.
The 2 applets above are basically the same, except that the second one
contains code similar to
ivjLabel1.setBackground(Color.blue);
so that you can see what is happening.
It is obvious that the red label
is rendered behind the
blue label.