hello everybody,
I am new to this forum as well as in AWT/Swing. I am facing a problem and do not know how to solve this problem.
My code :
import java.awt.*;
import javax.swing.*;
public class NewClass extends JApplet{
public void init() {
JButton jb = new JButton("Send");
jb.setVisible(true);
getContentPane().add(jb);
}
public void paint(Graphics g) {
g.drawString("Hello",10,10);
}
}
Now my problem is first time the button is not visible, when I am moving the mouse pointer on that area then the button is being visible.
Why it is happening like this?
Please help me out..........
Thanks in advance...........................
