Re: panel size vs. frame size



atilagunes@xxxxxxxxx wrote:
suppose that i add a MenuBar
to that JFrame. how can i measure the best size of main Panel and its
bounds. i'm using null layout in main Panel

Don't do that. Use a layout manager and let it figure out the available remaining space. That's what they are for.

/Thomas

--
The comp.lang.java.gui FAQ:
http://gd.tuwien.ac.at/faqs/faqs-hierarchy/comp/comp.lang.java.gui/
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
.



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: Using panels
    ... You are adding panel to jPanel1 but not to it's layout. ... I think part of your problem is calling addon jPanel1 and not addComponenton its layout. ... And since we are talking about IDEs does it add the variable declarations at the end of the class file or is that author's choice? ...
    (comp.lang.java.gui)
  • Re: datagrid "can grow" ?
    ... You can of course get rid of grid layout. ... You could also put the datagrid & ... all the controls below it into the same flow layout panel. ... the DIVcontaining the controls to that value + some number. ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)
  • 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: [Usability] Reasoning behind default panel setup?
    ... Many icons, especially application icons, generally look better when ... The current layout, using two 24px panels, ... of 16px icons (this allow them to have a larger window list). ... (as KDE has a big panel but small notification icons). ...
    (GNOME)