• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

jpanel position

 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
 
sa sam
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 22815
132
Eclipse IDE Spring Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
If you are using a wood chipper, you are doing it wrong. Even on this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic