473,387 Members | 1,456 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Modal dialog is hidden by parent Frame component

Hi,
I am writing an application with a JFrame as the main window and
several dialogs to gain user input. The problem arises when another
window (from a differnent apllication) hides my applications window
(while one of the (modal) dialogs is currently showing). When my
applications window reappears again the dialog is no longer showing. I
have to iconify the other applications window in order to make the
dialog reappear again.

What do I have to do tell Java that I want my dialog to be visible
after the application becomes visible again?

Thanks in advance for yout help.
Bjoern
Jul 17 '05 #1
2 7126
Liz
((JDialog)p3).toFront();

"Bjoern Obermeyer" <bj**************@gmx.de> wrote in message
news:32**************************@posting.google.c om...
Hi,
I am writing an application with a JFrame as the main window and
several dialogs to gain user input. The problem arises when another
window (from a differnent apllication) hides my applications window
(while one of the (modal) dialogs is currently showing). When my
applications window reappears again the dialog is no longer showing. I
have to iconify the other applications window in order to make the
dialog reappear again.

What do I have to do tell Java that I want my dialog to be visible
after the application becomes visible again?

Thanks in advance for yout help.
Bjoern

Jul 17 '05 #2
Bjoern Obermeyer wrote:
Hi,
I am writing an application with a JFrame as the main window and
several dialogs to gain user input. The problem arises when another
window (from a differnent apllication) hides my applications window
(while one of the (modal) dialogs is currently showing). When my
applications window reappears again the dialog is no longer showing. I
have to iconify the other applications window in order to make the
dialog reappear again.

What do I have to do tell Java that I want my dialog to be visible
after the application becomes visible again?

Thanks in advance for yout help.
Bjoern


hi,
I pass the JFrame object into the dialogs to solve it, like

public class MyDialog extends JDialog {

public MyDialog(Frame parent, boolean modal, .....) {

super(parent, modal);
.......
}

.........
}

and,
.....
JFrame frame = ........
.....
MyDialog md = new MyDialog(frame, true, .......);
md.show();

try it and good luck.

:)
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: CaptainZ | last post by:
When I open a modal window using 'showModalDialog' from an aspx page it works fine. But when I then perform a submit in my modal window to get data from the server, instead of the page returning to...
2
by: Mark Rae | last post by:
Hi, I'm opening an ASP.NET page using the JavaScript window.showModalDialog method. This page has a submission button on it which, when clicked, opens a new window, which is pretty much as...
6
by: Mark Goldin | last post by:
I have main aspx page with a button that will show a modal dialog in the Browser when a user clicks on the button. On the modal form the user will do some selections. The he will submit his...
2
by: Guadala Harry | last post by:
I have a frameset aspx page that enables users to upload photos. One frame/page shows a thumbnail list of prevously-uploaded images, and the other frame/page includes the controls that enable...
10
by: Guadala Harry | last post by:
I have a modal dialog that currently does all of the following except item 4. 1. lets users select a graphic from a list of thumbnails (and when selected, displays the full-size image in a...
1
by: Davey P | last post by:
I am able to open a modal dialog on a button click from the code behind by placing a RegisterClientScriptBlock() method in the button click event handler. This all works fine, but the problem is...
5
by: Dmitry Akselrod | last post by:
Hi Everyone, I am working in VB.NET, Framework v.1.0. I have tons of forms in my application. I have a situation, where a form starts another form as a Modal Dialog. The Modal Dialog then...
3
by: hagarwal | last post by:
Hello Can a modeless form be used as the "owner" of a modal form? Here's the situation, from my MainForm, I have created a modeless form using "Show" - and showed a modal form using...
2
by: sthrudel | last post by:
Hi! I'm working on a web application in Asp.net and what I would like to have is a cross borwser modal dialog which accepts user's input. I would like to catch what the user clicked on the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.