• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

flow layout

 
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am using flow layout for the main panel
How can I make it increase respectively to the main JFrame?

Thanks
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is this "main panel"?
The JFrame's content pane defaults to border layout.
I am sorry but I did not understand what you meant by "How can I make it increase respectively to the main JFrame?
"
 
chen young
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry for the lack of information
I created a jframe and add into the jframe a jpanel.
I defined the flow layout for the panel.
Now when I am running the application and choosing the window maximize option the panel will stay in the same size, means that half of the window will be “empty”.
 
Maneesh Godbole
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Strange.
How are you adding the panel to the frame?


 
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You would do well to read up on the various layout managers at the Sun Swing tutorials. It will tell you how to solve this. One possibility is to add the inner JPanel to the JFrame's content via BorderLayout.CENTER, though this is the default for the contentPane so somehow your app must be changing this. Again, without more information it would be difficult to provide more help. Best of luck and HTH.

angus young wrote:Sorry for the lack of information
I created a jframe and add into the jframe a jpanel.
I defined the flow layout for the panel.
Now when I am running the application and choosing the window maximize option the panel will stay in the same size, means that half of the window will be “empty”.

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic