File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes Urgent focus issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Urgent focus issue" Watch "Urgent focus issue" New topic

Urgent focus issue

selvas kumars
Ranch Hand

Joined: Jan 06, 2001
Posts: 115
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??
selvas kumars
Ranch Hand

Joined: Jan 06, 2001
Posts: 115
i got the answer...i have to call setState(Frame.NORMAL) in Frame.
Alex Ioannou

Joined: Nov 14, 2001
Posts: 25
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.
Indicates that no state bits are set.
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.
It is sorta covered in the JavaRanch Style Guide.
subject: Urgent focus issue
Similar Threads
Passing values between windows/frames
how to render one xhtml page's panel from the popup window
Application Modal JDialog is blocking its child JDialog
parent window not refreshing second time
Passing values between windows/frames