>:Anyone knows how to resize the width of
>:JToolBar, JMenuBar and decorator of JFrame?
[quoted text clipped - 4 lines]
>:
>:Thanks for your help!
By decorator, I assume you mean the minimize, maximize and close
decorations, for example, and you can't resize those unless you make
your own. They're provided by the host OS, not by Java.
Both JToolBar and JMenuBar are subclasses of JComponent, and ultimately
back to Container, which lets you use a layout manager of your choice.
It also lets you set min, max and preferred sizes. You may want to get
more familiar with these areas.
In the case of a JMenuBar, I can't imageine why you'd want to mess with
its width anyway -- it's typically handled by the UI. But it's your
app, so I can't second guess your needs.
For a JToolBar, it's more a function of what you put into it -- and he
layout manager you use. The default layout manager is FlowLayout, which
wraps things if it gets too short. I don't remember whether it respects
min/max sizes of the items placed into the toolbar. I used a different
layout manager for more complex toolbars, and I specifically set the
min, max and preferred sizes on all those components.
HTH.
= Steve =

Signature
Steve W. Jackson
Montgomery, Alabama