• Post Reply Bookmark Topic Watch Topic
  • New Topic

flow layout  RSS feed

 
chen young
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
  • 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
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • 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
  • 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: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Strange.
How are you adding the panel to the frame?


 
pete stein
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
  • 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”.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!