Questions tagged [jdialog]

The main Java Swing class for creating a dialog window.

The main Java Swing class for creating a dialog window.
A Dialog window is an independent subwindow meant to carry temporary notice apart from the main Swing Application Window. Most Dialogs present an error message or warning to a user, but Dialogs can present images, directory trees, or just about anything compatible with the main Swing Application that manages them.

1021 questions
-1
votes
1 answer

How to create a modal JDialog?

I want to create a modal JDialog which will be called from JMenuItem. I have read some post and found an example (look belove). In this example main frame is called from main method. How to create something like that, but in main method will only be…
usr999
  • 157
  • 2
  • 7
  • 20
-1
votes
1 answer

Return null when closing JDialog

I have a table that has a JDialog for add new record, When i click to add Button and want to add a new record and JDialog opened, I close JDialog window and it returns null for my all columns of my table rows. This is my JDialog constructor: public…
Sajad
  • 2,273
  • 11
  • 49
  • 92
-1
votes
1 answer

How to Access JDialog information from parent JFrame?

** I have updated my question per help and comments I received. Now my question is: After calling the following code: SearchBox searchBox = new SearchBox(); // SearchBox extends JDialog int state = searchBox.showSearchDialog(); // Sets visible to…
Richie Episcopo
  • 383
  • 1
  • 3
  • 15
-1
votes
1 answer

JDialog does not close on 'X' button click

I have written an application that has one main window and multiple dialogs, however one of these dialogs does not close when the user clicks the 'X' button at the top right corner. There is an OK button in the dialog which closes it correctly, so…
Slicedpan
  • 4,995
  • 2
  • 18
  • 33
-1
votes
2 answers

JLayeredPane with a JDialog

I am unable to make any components apear on a JLayeredPane when adding it to a JDialog. I have also been unable to find a web resource that shows this may be done in a reasonably sized block of code. Every sight iv looked at "claims" this can be…
blackDog
  • 1
  • 1
  • 5
-1
votes
1 answer

JFrame created from inside another JFrame refuses to appear

It appears that tonight will be the night that I complete my rebaptism into the insanity that is Swing. I am sure that my problem is a common, simple one, but I cannot seem to locate an appropriate answer. Continuing from my earlier design in…
user978122
  • 5,531
  • 7
  • 33
  • 41
-1
votes
1 answer

JDialog take time to close around 45 seconds

I have a MyDialog which extends JDialog, when I close the MyDialog it will take a time around 30 - 45 seconds. MyDialog is a child form of my main form which is JFrame and until MyDialog is closed the focus can not come to main window. What will be…
Mahmood
  • 52
  • 1
  • 6
-1
votes
1 answer

How to make a window can listen to another windows?

How it works? Class MiWindows is responsible for running the class MiOtherWindows. MiOtherWindows class interacts with the user who changes their status and closes. Class MiWindows detects the change of value in the class MiOtherWindows. The Class…
Gino
  • 33
  • 4
-2
votes
1 answer

Java & Swing - Is it possible to have two JDialogs popup at the same time?

Is it possible to have two JDialogs popup at the same time, second below first one?
jadrijan
  • 1,438
  • 4
  • 31
  • 48
-2
votes
0 answers

Netbeans IDE places Button click event in the middle of other button click event (java)

I'm new to Java. I have a jFrame with 3 buttons. Button2 performs some action on a SwingWorker. I want to click Button3 and open a new dialog. When I am in the "Design" mode and click Button3 it sticks the Button3 actionevent code in the middle of…
Chris J.
  • 1
  • 1
-2
votes
1 answer

After closing a modal JDialog, sometimes main window doesn't receive focus until another modal dialog is shown

I apologise ahead of time of lack of reproducable example, the app i have is very big, and the problem seems to be related to weird combination of controls and focus switches, which i haven't been able to reproduce with a shorter program. Basically,…
siggemannen
  • 3,884
  • 2
  • 6
  • 24
-2
votes
1 answer

How to remove red hat icon from top left corner Java Swing

Is there a way of removing the rhel red hat icon from top left corner in JDialog window ? Purpose is to have only the text "Activities". red hat icon I have tried to search from where is coming that image, but no success. Can you please help…
James
  • 3
  • 2
-2
votes
1 answer

Pop-up window when clicking a JMenuItem

I'm trying to show a pop-up window when the user clicks on a JMenuItem. I've got the following piece of code: menuAnular = new JMenuItem(w.translate("ETI_ANULAR"),imageAnular); menuAnular.addActionListener(new ActionListener() { @Override …
gab
  • 29
  • 5
-2
votes
2 answers

How to use parent's favicon for JDialog?

I am trying to assign a favicon to a JDialog. This code works, but the image ends up hardcoded. ImageIcon favImageIcon = new ImageIcon("../images/default.gif"); Image favIconImage= …
sixtytrees
  • 1,156
  • 1
  • 10
  • 25
-2
votes
1 answer

jtextfield retains value in jdialog after closing jdialog

I'm new to Java and Swing. I created a jframe and I added a menubar and MenuItem in it. On clicking a menu item, a jdialog should open. Now the jdialog has a jtextfield in it and a jlabel. Now the problem for me is 'when dialog is opened for first…
pratik
  • 3
  • 3