• Post Reply Bookmark Topic Watch Topic
  • New Topic

Getting an a TextBox to show in an Applet

 
Enrique Gonzalez Moore
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wrote an applet with a button and a text box. When I run the html doc of the applet the button shows but the textbox does not. How do I get the text box to show?

My java code:



My html code
 
pete stein
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure what you're trying to do and what exactly isn't working except I do see that you're trying to mix AWT and Swing components in the same program, without need, and this will often mess you up. I strongly recommend that you stick with Swing and get rid of all AWT in your code. Also, why does your applet code have a main method? You may wish to read some of the tutorials on how to code Swing and JApplets.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!