Re: Font size
Are you saying that GUI elements, such as buttons, are redrawn in
every 'frame' of an animation, and that therefore these GUI
elements should be as simple as possible, without Layout? Is
there no way to have only the moving part of the applet redrawn?
Don't render directly to the 'root pane'.
Thinks of it this way. Imagine doing the masses-on-spring
animation in a Panel or JPanel. Then it could be put into the
CENTER constraint of the BorderLayout* of an applet, frame,
window, ..dialog, ..
* Not that it has to be put in the CENTER of a BorderLayout,
but mostly that is where I'd put the main 'panel/component
I discourage *ever* doing a custom rendering in something other
than a containter, and in fact, I will usually put all the the GUI
elements (e.g. the anim panel, buttons and radio buttons) into
another panel that is 'the GUI', then tat (J)Panel can be used
wherever and however needed.
Has anybody metioned nested layouts, yet?
Message posted via JavaKB.com