Solved

Force Window to minimize ?

Posted on 1997-11-25
1
1,740 Views
Last Modified: 2012-06-21
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
Comment
Question by:ezra
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 4

Accepted Solution

by:
russgold earned 50 total points
ID: 1231176
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question