Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Urgent focus issue

 
selvas kumars
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks,
I am having 2 windows,where the second window is launched by clicking the button on first window.If the second is minimised and if user tries to click the button on first window,
the second which is already opened should get maximised.
Basically how to maximise the window from its minised postion??
can anybody give the method which does??
thanks,
silva.
 
selvas kumars
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i got the answer...i have to call setState(Frame.NORMAL) in Frame.
silva.
 
Alex Ioannou
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since java 1.4 there is a new set of methods to support window state operations.
Under JFrame there is:-
public void setExtendedState(int state)
Sets the state of this frame. The state is represented as a bitwise mask.
NORMAL
Indicates that no state bits are set.
ICONIFIED
MAXIMIZED_HORIZ
MAXIMIZED_VERT
MAXIMIZED_BOTH
Concatenates MAXIMIZED_HORIZ and MAXIMIZED_VERT.
Note that if the state is not supported on a given platform, nothing will happen. The application may determine if a specific state is available via the java.awt.Toolkit#isFrameStateSupported(int state) method.
Al
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic