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

JDialog not showing panel after closing and reopening

The JDialog isn't showing the JPanel after closing of the dialog and then if the user immediately repeats the action it isn't showing a panel at all but a dialog that is solid black with a small white box in the top left corner. I have tried…
Grim
  • 2,398
  • 4
  • 35
  • 54
-1
votes
1 answer

How to I make a table on a JDialog

So I am making a game, and when you push the button called history, a JDialog pops up where it shows you the moves you have done. I was wondering how I would make a table on the JDialog with an ok button at the bottom it. Example Table: |Move| …
Lahey11
  • 11
  • 1
-1
votes
2 answers

JTable listener to open JDialog

Sorry if there is a similar question, couldn't find anything. Basically, in my program, I have items in a JTable with their qualities, description, price etc. on each row. I want to open a new JDialog with more info about the item whenever it is…
Nikola
  • 890
  • 1
  • 11
  • 35
-1
votes
1 answer

JDialog doesn't trigger PropertyChangeListener

I have two similar JDialogs in my applet, both act on the input given in the text fields and have Enter and Cancel buttons. I've added a property listener to both both dialogs, however only one of the dialogs triggers the property listener and not…
Andrew Brick
  • 276
  • 2
  • 4
  • 18
-1
votes
1 answer

Programmatically close JDialog in java

I am writing some JUnit tests for my Java program. Some of these tests cause messages to pop up that stop the tests and require me to click ok for them to continue. Is there a way I can programatically, from my test class, close the JDialog?
user2397282
  • 3,798
  • 15
  • 48
  • 94
-1
votes
1 answer

How to add a JDialog box into a menu bar?

I was wondering whether someone would possibly be able to help me with a problem that I am having? So I am creating a game of checkers and I wish to add a menu bar to the top of my window, the code of which can be seen below, however within one of…
Hawk97
  • 19
  • 8
-1
votes
2 answers

making pop up window by using SwingUtilities.invokeLater

I am writing a turn-based game on the internet. I try to pop up a window that should be in front until the input stream is ready. I created smth like this, but it seems that it does not work. class CustomBlockerDialog extends JDialog { /** * …
slawic
  • 1
  • 1
-1
votes
1 answer

JDialog over Desktop area

I am trying to use a JDialog at the right of the screen, everything is almost perfect, but, if someone press the button on ther right end of the TaskBar, click on "Show Desktop area" my JDialog disappears I have to use ALT + TAB to get it back in in…
user2582318
  • 1,607
  • 5
  • 29
  • 47
-1
votes
1 answer

How do i close completely a JDialog without closing the Frame

How do i completely close a JDialog window without closing the Frame one? I already tried using dispose(), but seems it hides the JDialog instead of realeasing it's memory, althought i believe this is not truth acoording to java API. Is it correct…
Roni Castro
  • 1,968
  • 21
  • 40
-1
votes
1 answer

Get JTextField text from JDialog

I have a JFrame, I have a check box in the JFrame that once clicked opens a JDialog, which then adds a JPanel I have created. Inside the JPanel I have 2 arrays of JTextField. I need to get the values from these JTextField into my JFrame to use them…
JTK
  • 1,469
  • 2
  • 22
  • 39
-1
votes
1 answer

Create a JDialog from a JDialog

How can you create a JDialog when you're in a JDialog? DialogTest dialog = new DialogTest(this,true); The above code doesn't work because the first parameter has to be a JFrame, but in this case it's a JDialog. Thanks in advance!
-1
votes
2 answers

Exiting an application using "setDefaultCloseOperation" with a dialog

I have code with the class MainFrame, and the this is a mainframe object. So here's my problem. When I do this.setDefaultCloseOperation(DISPOSE_ON_CLOSE), it closes out of the dialog, but not the application. I know I should be using EXIT_ON_CLOSE,…
Peter Barnett
  • 201
  • 1
  • 2
  • 13
-1
votes
2 answers

Java histogram in 2 windows from JFileChooser

this code at the moment allows me to select multiple text files which are then analysed into a bar chart, my problem is when for example 2 files are selected from the JFileChooser the bar charts are opened one after another, so first one will open…
-1
votes
2 answers

JDIalog throws NullPointerException when accessed from JFrame

My JDialog throws a NullPointerException when I access it through Jframe but works fine when I run the JDialog class itself. I have a jMenuItem called "modify" in my jFrame that accesses jDialog. private void…
CodeFreak
  • 31
  • 5
-1
votes
3 answers

How can i set JTable in JDialog

I have a JPanel where i need to open other window (JFrame, JDialog, JOptionPane) that has JTable on it. After manual filling of JTable need to get its data back to JFrame. How can this be made?
crzbt
  • 183
  • 4
  • 14