5
Contributors
8
Replies
10
Views
5 Years
Discussion Span
Last Post by JamesCherrill
Featured Replies
  • Check setPreferredSize function. Read More

  • 1

    you have two options (valid for all LayoutManegers excluding AbsoluteLayout) 1/ jumping with [URL="http://download.oracle.com/javase/tutorial/uiswing/components/toplevel.html"]Top-Level Container[/URL] on the Screen, then look for [CODE]pack();[/CODE] 2/ jumping with expected [URL="http://download.oracle.com/javase/tutorial/uiswing/components/panel.html"]JPanel[/URL], then look for [CODE] JPanel#setPreferredSize(new Dimension(int, int)) JPanel#revalidate(); JPanel#repaint(); [/CODE] both are valid, but for OP' is required second from options, any ideas … Read More

  • 1

    Hint - You can also create panels within panels. Read More

0

Its the full width of the window; just how broad did you want it to be?

i want to change the size of north panel according to my needs. I want to accomodate components properly. But due to smaller size of the panel some of components are not visible.

0

thanks for your replies.
I applied all these methods. By using setPrefferedSize the panel becomes broad but no component appearin it.

Also by using panel within a panel i have the same output.

pack() does nothing in my case.

please any help, why swing components do not appear??

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.