Re: revalidate() vs. repaint()?



On 2005-04-28, Rene Ruppert <rene.ruppert@xxxxxxxxxxx> wrote:
> Hi,
>
> do I interpret the docs correctly that validate(), invalidate() and
> revalidate() are only useful if I use a layout manager?
> I know: "ALWAYS use a layout manager" :-), but if I don't a repaint() should
> be enough, or am I wrong?

The validate(), invalidate(), and revalidate() methods are useful if an
extension of Container overrides its doLayout() method, say to do
something other than the default behavior of invoking the
layoutContainer(Container) method of the LayoutManager of the Container.

Using a custom Container that overrides its doLayout() method to
layout the Container is an alternative to using a custom LayoutManager.
.



Relevant Pages

  • Re: GridBagLayout - A simple test program
    ... mouse drags by resizing the container every few pixels, ... If using the JWS version resizing the frame will also reset the panel to the size of the content pane. ... To ensure selectability, you would have to set a non-zero lower bound ... panel to display the results of the layout. ...
    (comp.lang.java.help)
  • Re: GridBagLayout - A simple test program
    ... mouse drags by resizing the container every few pixels, ... To ensure selectability, you would have to set a non-zero lower bound ... components overlapping each other and suggested the use of a second ... panel to display the results of the layout. ...
    (comp.lang.java.help)
  • Re: Help with overflowing container???
    ... I've been trying to overcome a layout situation that is just eluding ... viewport it overflows out of that container. ... By over-declaring, over-defining, over-constraining the height ... 3- Make sure your CSS code passes validation: http://jigsaw.w3.org/css-validator/ ...
    (comp.infosystems.www.authoring.stylesheets)
  • Re: ColumnLayout?
    ... Here is a rudimentary layout manager that shows you what you need to ... with angle and distance from the center of the Container. ... * @param height height of box you want generated start to live in. ... public StarLayout (int width, int height) ...
    (comp.lang.java.gui)
  • Re: setLocation does not woork
    ... >Look at the objects in your browser and you will see that they dont move. ... You should almost never use setLocation. ... impossible to write a layout manager with enough common sense. ... setLocation of every element in the container. ...
    (comp.lang.java.help)