I'm an absolute beginner to
Java and this question may seem trivial, but I tried to solve this problem for the past 3 days and it seems that I'm stuck...
I'm writing a JApplet which displays a few GUI compotnents (JTextField, JLabel) and which is also supposed to display a message in the status bar.
I created all the GUI components objects and attached them to the interface in method init().
In method paint() I used showStatus method to display a message in the satus bar. I also used repaint().
The problem is that when the
applet loads it shows only the status bar message - and no interface that I created in init().
Why is that?
I tried puting showStatus in intit() but it gets wiped out by the "Applet started " message.
I also noticed that the repaint() wipes out the GUI components that I created in init(). But if I don't use I can't display the status bar message (but the interface is intact!).
How do I display both the interface and the status bar? Could anyone help me understand this?
TIA...