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 do I use a Main class to implement Swing Components from other classes in my project?

Im developing a project in which I have "Class1", "Class2", and "Class3". Class2 and Class3 both create JFrame's, each containing various JButton's, JLabel's, and other swing components. How do i make so in Class1 I can reffrence the JButton from…
Evan
  • 13
  • 2
-1
votes
1 answer

Stop execution of program until JDialog is exited

I am trying to open up a bunch of JDialogs one after another. The goal is that only after one JDialog is closed the next one is created. I have tried to use setModal(true) for the dialogs, but somehow that does not make it work. Just for you to get…
Intern
  • 1
  • 2
-1
votes
1 answer

jTextField.setText() does not work in the Jframe

I created a simple jFrame with a jDialog, in this jDialog I have textfield just to get an ID, them, with this ID, use a webservice to search for the information and them show the information in the jFrame, however, all textfields that I use on my…
-1
votes
2 answers

Vertical scrollpane problem in jdialog

i have a question regarding the vertical scrollpane in jdialog.when i run My application the jdialog vertical scrollbar displays end of the data.I need to scroll it upwards.How can i get the scrollbar bydefault at the top.
hemanth kumar
  • 3,068
  • 10
  • 41
  • 64
-1
votes
1 answer

Is there a way to open multiple instances of modeless JDialog in java swing without disabling its components?

I have a GUI which consist of a JLabel named "View": with a mouseClickEvent attached to it. Upon clicking on the "View" JLabel, i can open multiple instances of a modeless JDialog. The JDialog itself consist of several disabled JTextFields and a…
adhu
  • 35
  • 6
-1
votes
1 answer

How can i refresh a JDialog Image Correctly?

i am coding a program using SWing in java, but this is my problem, when i press a button, I want that every time I press a button, I update a new image in the same position as the previous one, I try to do it in the action listener of the code, but…
-1
votes
1 answer

Displaying JDialog Java

Im going to be brief, I dont know why when I display a JDialog, the tipical java icon in the top left of the window does not appear. I have this: And it has to be like this: The code of that window is the following: The relevant parts are this…
victor26567
  • 129
  • 9
-1
votes
1 answer

Can We Change JFrame to JDialog and add APPLICATION_MODAL to it in Java Swing

I mistakenly created a Swing project, using more than 10 JFrames, every thing is working fine. but in many cases i was feeling like creating multiple JFrames was not good. and i have also figured out that creating Swing project with multiple JFrames…
Intact Abode
  • 382
  • 5
  • 20
-1
votes
1 answer

Netbeans: jDialog not showing content?

For my uni assignment I am doing a healthcare register, and I was thinking off login in -> looking at past vaccines(pop, jdialog) -> register new vaccine(pop up, jdialog), but for some reason my jdialog isn't showing the content only the top right…
MoYassine
  • 33
  • 1
  • 1
  • 8
-1
votes
2 answers

JButton does not open JDialog

I am building a simple program. I have a class that extends from JDialog and class that extends from JFrame and is GUI of the application. I implemented ActionListener which should open the dialog after clicking on the JButton. Nothing happens…
Tomáš Nosek
  • 213
  • 2
  • 12
-1
votes
2 answers

Swing JFrame, JDialog position with strange padding

I have a main JFrame (1), after that I want to put a JDialog (2) below (same left border position): dialog2.setLocation(frame.getX(), frame.getY() + frame.getHeight()); and put another JDialog (3) next to the right (same top border…
yelliver
  • 5,648
  • 5
  • 34
  • 65
-1
votes
1 answer

How to make Dialog Window pop up when the program starts?

I am working on a Rock Paper Scissors Game and am wondering how I would make a Dialog Box pop up every time the program is launched. This is what the main JFrame looks like: This is what I want to pop up when the program is launched: Is there any…
-1
votes
1 answer

Issue with Dialog Modality in Swing in java 1.6

I have 3 dialog that gets displayed together in my project. First dialog is modeless with setVisibleOnTop(false). Second dialog is modeless with setVisibleOnTop(true). Third dialog is Application Modal with setVisibleOnTop(true). Now the issue…
Onki
  • 1,879
  • 6
  • 38
  • 58
-1
votes
1 answer

Unable to set a DefaultTableModel to a JTable contained in a JDialog

I have created a JDialog that contains a JTable, when I try to assign a DefaultTableModel to it, it gives me an exception and the JDialog does not even appear. java.lang.ArrayIndexOutOfBoundsException: 11. Code to assign the table…
-1
votes
1 answer

Java Open GUI and wait until its closed

I'm trying to open a GUI and then wait until the JFrame is closed. I heard about JDialog but I don't know how to use it with my actual code: GUI gui = new GUI(); gui.show(); // Creates some JButtons, JLabels, and show the JFrame. Now I would like…
Slei
  • 15
  • 8