Re: panel size vs. frame size



atilagunes@xxxxxxxxx wrote:
i'm asking these coz two jPanel must be fix and the remain jPanel must
takes its bound according to others while jFrame size is changing.

Sounds like it mght be well suited to a nested layout,
or perhaps a single BorderLayout.

Put the component that you want to resize into
BorderLayout.CENTER, then if the other components
can go 'around it', try BorderLayout.EAST and WEST
or BorderLayout.NORTH and SOUTH.

If you need both the fixed components on one side,
put them in a JPanel with an appropraite layout, then
add the JPanel to the main BorderLayout (in any one
of NORTH/EAST/WEST/SOUTH).

all standart layouts except box and gridbag are meaningless for me..

You need to play with them till they have a meaning.

It is very hard to layout GUI's without some understanding
of a number of layouts, as well as the idea of nested layouts
(putting a panel with a different layout, inside a larger layout).

Andrew T.

.



Relevant Pages

  • Re: Noddy layout question!
    ... there are two many labels to fit in the view, ... JPanel lPanel = new JPanel); ... You need to put the scroll pane in a component that makes it the size that you want to see it or set it's preferred size and use a layout manager that respects this. ...
    (comp.lang.java.gui)
  • Re: A Graphics question
    ... > regardless of the size of the JPanel or BufferedImage. ... The easiest way is to use a layout manager to place the pageNumber object ... Alternatively you can simply draw directly on the Graphics object as you ...
    (comp.lang.java.programmer)
  • Re: Einfaches Problem zu Layout
    ... Buttons, Labels, Textfelder bringe ich in einem anderen JPanel myp2 ... Für jedes JPanel spendiere ich einen ein eigenes Layout ... Dies zwei JPanels montiere ich an den Container Container myCont, ...
    (de.comp.lang.java)
  • Re: FlowLayout and lightweight IDEs
    ... When working with a JPanel, ... mix laid out widgets *in* a custom painted panel. ... A FlowLayout is probably not appropriate for the type of layout ... image download. ...
    (comp.lang.java.help)
  • Re: Please help the GridLayout problem
    ... I am tring to add several small JPanel to a big JPanel (using ... should never add components directly to a JFrame. ... your panels should be nor how big the JFrame should be. ... And since the GridLayout layoutManager's layout strategy ...
    (comp.lang.java.gui)