• Post Reply Bookmark Topic Watch Topic
  • New Topic

How do I control the size of a button (or any component) in an applet or Frame?  RSS feed

 
Enrique Gonzalez Moore
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wrote a simple applet with a button and a text box inside of a frame. When I run it and resize it the button resizes with the window or applet section of html doc. How can I prevent the button from resizing?

Here is my code so far. The maxsize method does not seem to work.

 
pete stein
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Again, as per your previous similar thread, you'll want to back up some and read the tutorials. Is this code supposed to create a stand-alone JFrame or a JApplet? Do you really want to mix AWT and Swing components (answer: you don't). Have you read up on creating applets and sizing them through the html code, or the tutorials on the layout managers yet?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!