Two JButton problems
Hey guys.
My first problem is that a JButton won't display in a newly-run applet unless the cursor if hovered over it, and will disappear if I bring up another window and go back to the applet. This applet also contains a Graphics component and a few other GUI objects (although whether or not the latter are created doesn't seem to affect the JButton's behavior).
Also, I'm unable to display .bmps on JButtons.
ImageIcon icon = new ImageIcon("[...].bmp");
okButton = new JButton (icon);
Everything runs normally with the above code included, but the button itself remains blank. I unfortunately can show only a very limited amount of code, but will try to provide more if necessary. Appreciate the help in advance.
|