Microsoft
Software
Hardware
Network
Question : Dialog.ModalityType.APPLICATION_MODAL
I have a JTable which contains cells that when clicked bring up a dialog box.
I have this dialog box set to be a modal dialog box.
I want it to be so that only 1 dialog box at a time is displayed, ie if the user clicks on the cell in row 0, the dialog comes up but then when the cell in row 1 is clicked, nothing should happen.
However, clicking on cell 1 brings up another dialog. So this seems to be an issue of the scope of the modality.
So I do this:
1: 2:
this.setModal(true); this.setModalityType(Dialog.ModalityType.APPLICATION_MODAL);
"this" is the abstract class extending JDialog from which the instantiated dialog originates.
I was thinking that setting the modality to APPLICATION_MODAL would address the problem, but it does not.
What do I need to do?
Answer : Dialog.ModalityType.APPLICATION_MODAL
For a diaplog to be model , it needs to be modal to something. In your case it sounds like it is your table so try the follwoing
dialog = new JDialog(SwingUtilities.get
WindowAnce
stor(table
));
Random Solutions
Insert data from test.xls to Mysql database table with php
Can you please tell me about the latest Microsoft Certification Exam for ASP.NET/C#/Visual Studio?
VMWare vCenter Server on a VM?
Can I block certain ports on my website but keep them open intenally?
Returning First and Last Rows, grouped by columns.
Print 'Incomplete' for crystal report subtotal if any detail records are zero
HOW FIND OUT WHAT SOUND CARD IS INSTALLED ON THE MOTHERBOARD??
Performance counters in VB.net
enable file shares on a Windows home LAN
How can I change the formula of a cell based on the string value in a dropdown?