Why I can in applet when i set size with (p -> is my panel) p.setSize(100,100); is not seting the size? I just getting the constant size difined by Gridlayou(3,2)? -------------- * - - - -------------- - - -
* is my painted in blue area on applet Please help me i posted the question already today but from some reasonse no body had responsed me yet Thanks for help
"zick", The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with a new name which meets the requirements. Thanks.
When using GridLayout( or any other layout for that matter ), the layout manager always sets the size, so calls to setSize() don't work... If you want resizing to work, do setLayout( null ) in the init() method of your Applet... but be prepared to do a setBounds( x, y, w, h ) for every component you add to your Applet...
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Those who dance are thought mad by those who hear not the music. This tiny ad plays the bagpipes:
Devious Experiments for a Truly Passive Greenhouse!