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
0
votes
2 answers

minimizing the jframe window with a jbutton click

I know to minimize the jframe, I need to use setExtendedState(JFrame.ICONIFIED); But what I am trying to figure out is how to get to the frame. This dialog is child of a parent dialog. Here is the Constructor. public…
jkteater
  • 1,381
  • 3
  • 36
  • 69
0
votes
2 answers

How to attach a window to another window

Please have a look at the following code Main.Java import java.awt.event.*; import java.awt.*; import javax.swing.*; public class Main extends JFrame { private JButton ok; public Main() { ok = new JButton("OK"); …
PeakGen
  • 21,894
  • 86
  • 261
  • 463
0
votes
3 answers

How to reload JDialog in Java?

Hello I've problem in reloading JDialog. I've 2 JRadioButton: Not defined Defined in first row When I click a button, a dialog will appear, it's content will depend on the radio button. If I choose the first one it will display "Hello World!", but…
Fahmi Ramadhan
  • 287
  • 2
  • 4
  • 11
0
votes
2 answers

JDialog refuses to close

I am busy making a basic Java word processor as a personal project, and it includes a popup JDialog. However, when the user clicks the 'Cancel' button, the JDialog refuses to close and the only way to close it is with the Close button on the frame…
condorcraft110
  • 195
  • 1
  • 2
  • 8
0
votes
1 answer

how to make a JDialog frameless?

my dialog example as following: public class DialogNotify extends JDialog{ public DialogNotify() { setModal(true); setSize(200, 100); setVisible(true); } } how to make it shown frameless ? by frameless, I mean with "close"…
user1447011
  • 1,183
  • 3
  • 11
  • 14
0
votes
3 answers

How to add a JDialog in to desktop pane or just call from an internal frame

I am working on a project that uses MDI form in java. I have created a frame and then added a desktop pane to it. My project uses lot of internal frames. Also those internal frames require to show custom dialogs that i have created on my own. for it…
Jasir
  • 677
  • 1
  • 8
  • 26
0
votes
1 answer

Dialog with resize minimize or Frame depending on parent

I would like to have a window that behaves like a Dialog, in the terms, that it closes with the parent window, however it shall behave like a normal Frame, especially it shall have the maximize/restore button. How can I create windows, that are…
ted
  • 4,791
  • 5
  • 38
  • 84
0
votes
1 answer

dialog inside of a JInternalFrame

I have a JInternalFrame and I need to get some Information from user (a JFileChooser & two JTextfield). Using another JInternalFrame, application continues running and doesn't wait for input. How can I open a JDialog as a internal dialog?
Ariyan
  • 14,760
  • 31
  • 112
  • 175
0
votes
1 answer

Show dialog when Swing exception is thrown

I have a Java application that uses swing. I have found a way to catch all uncaught exception in an application (see below). I would like to log a message, show a dialog with a message for the user and kill the application. The problem is, what I'm…
ixM
  • 1,244
  • 14
  • 29
0
votes
2 answers

Pass 2 objects in ComponentListener and those objects

void NewJDialogcallone(JFrame frame) { location = frame.getLocationOnScreen(); int x = location.x; int y = location.y; dialog.setLocation(x, y); dialog.setLocationRelativeTo(frame); dialog.setVisible(true); …
Suraj B
  • 25
  • 1
  • 8
0
votes
1 answer

JDialog not doing a re-layout when maximized

I seem to have the opposite problem of everyone else. My JDialog has both minimize and maximize buttons by default. When the maximize button is pressed, the dialog maximizes - but the content doesn't. It just stays the same size, centered in a huge…
CasaDelGato
  • 603
  • 7
  • 17
0
votes
2 answers

JDialog disposing another window

I'm currently working on a java game which opens up with a "start screen" frame. In the startscreen, I have a button called buttonLogin. Once you press buttonLogin, a login dialog launched by a LoginDialog class will pop up asking you for a username…
Anonymous181
  • 1,863
  • 6
  • 24
  • 27
0
votes
1 answer

Java Closing Another Window with JDialog

I'm currently working on a java game which opens up with a "start screen" frame. In the startscreen, I have a button called buttonLogin. Once you press buttonLogin, a login dialog launched by a LoginDialog class will pop up asking you for a username…
Anonymous181
  • 1,863
  • 6
  • 24
  • 27
0
votes
1 answer

Trying to obtain textField data on actionPerformed

JOptionPane.showConfirmDialog(null, instructorEditorPanel, "Edit Player JOptionPane", JOptionPane.OK_CANCEL_OPTION,JOptionPane.PLAIN_MESSAGE); instructorEditorPanel is a Jpanel with 3 textfields. I am trying to obtain the data in the…
Itchy Nekotorych
  • 882
  • 3
  • 10
  • 24
-1
votes
4 answers

what does this refer to in the action listener method of button in jdialog?

In my dialog box i have a button.In it's action listener method what does this refer to ? Is it the reference of the button or the reference of the JDialog ? What i have noticed is that it is the reference of JDialog because when in my IDE i press…
program-o-steve
  • 2,630
  • 15
  • 48
  • 67