[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1751
  • Last Modified:

Force Window to minimize ?

Hi !

I'm trying to minimize(iconified) window from a button, is it possible ?
I create a frame add button to the frame
I add actionListener to the button
On the actionPerformed I wrote the following:
      processWindowEvent(new WindowEvent(this,WindowEvent.WINDOW_ICONIFIED));
Nothing happened
I try to write despatchEvent(new
WindowEvent(this,WindowEvent.WINDOW_ICONIFIED));
)

in spite of nothing happened .

I tried this without add the WindowListener to the frame , hopping the
event will catch by the system.

When I add  the WindowListener with my WindowAdapter that implement the
following:
public void windowIconified(WindowEvent evt)
{
      Window window = (Window)evt.getSource();
      window.setVisible(false);
}

the window hide itself.

At the end my  question is :

Can I force "windowIconified " event from other component rather then the
user InputEvent , that will minimize my window ??
   
I'm using Jdk1.1.4 on Win NT4.0.

Thanks
0
ezra
Asked:
ezra
1 Solution
 
russgoldCommented:
This is a known bug.  See:
http://developer.javasoft.com/developer/bugParade/bugs/4037811.html

To get this fixed, be sure to register for the Java Developer Connection and vote that it is important to be fixed!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now