Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jpanel position

 
sa sam
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suppose I have a JFrame and JPanel. I make the size of JPanel(e.g. size 300*300) smaller than the JFrame(e.g size 500*500) and add the JPanel to the JFrmae's contentPane. I want to always keep the size of the JPanel(e.g it should not expand)and dispay it in the middle of the JFrame, even the JFrame is resized. Can anyone please tell me how can I do this?
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
sa sam
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you very very much.





i have 1 more problem , hope it will also get solve in minits .

i have menubar in jframe1. when i click on the menu i get new jframe (jframe2) inside jframe1. jframe1 is parent frame.

now my requirenment is , when i minimize my parent frame, child frame also get minimize automatically & when maximize then same event.

replay me fast.
 
Rob Spoor
Sheriff
Pie
Posts: 20665
65
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ajay chavan wrote:i have 1 more problem , hope it will also get solve in minits .

i have menubar in jframe1. when i click on the menu i get new jframe (jframe2) inside jframe1. jframe1 is parent frame.

now my requirenment is , when i minimize my parent frame, child frame also get minimize automatically & when maximize then same event.

replay me fast.

Use One Thread Per Question. You already opened another thread (which is good as it is not related to this problem), so don't continue here as well.

And Ease Up.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic