• 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

How to make a Jframe from minimum to maximum ?

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My environment is win2000+java1.2
Now I have build two Swing Jframe : frame1 and frame2. The frame1 is current shown in the screen . The other Jframe , frame2, is minimized . I want to when I click a button in the frame1, the frame2 can maximize and be shown in the current screen .
But I don’t know how to do this ? I have try to use the method requestFocus() to deal with it , but it can not work correctly . Who can tell me how to do this ? Please tell me in every detail. ThanX!
 
Ranch Hand
Posts: 305
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Perhaps you could try dispose() method instead to hide any frame at any given time...or perhaps the better way is to use JInternalFrames..never tried it but perhpas this could work..
All the best....
regards,
arun
 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I did something that jumps between 2 JFrames before.
1. pass frame2 to the frame1.
2. when the button is pressed, if frame2 is minimized, then call if (frame2.getState() == JFrame.ICONIFIED) frame2.setState(JFrame.NORMAL); then you can max the size by yourself. If frame2 is showing behind the frame1, then call frame2.show() to bring it the sceen.
Good luck!
Renee
 
WARNING! Do not activate jet boots indoors or you will see a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic