Skip to main content
Filter by
Sorted by
Tagged with
1 vote
2 answers
70 views

JDialog is interfering with JFrame owner MenuItem accelerators

I have a JDialog (non modal) with a JFrame owner. The problem I have is the that when the JDialog has the focus it is preventing the ActionListener associated with the JFrame JMenuItem accelerators ...
Ian's user avatar
  • 11
0 votes
0 answers
41 views

get rid of JDialog minimize button

I have a Java 17 app and it have a few tiny javax.swing.JDialog for user input purpose, with the following create properties: setSize(450, 500); setTitle(DailyTasksApp.getResource("...
Imre's user avatar
  • 1
0 votes
1 answer
41 views

JFileChooser title icon not changing

I have seen answers saying that the icon is taken from the parent, but it is not working for me. I have a JDialog class where I set the Icon: this.setIconImage(Toolkit.getDefaultToolkit().getImage(...
tumorito's user avatar
0 votes
0 answers
21 views

Dispose() inst working for JDialog when i try to close it

Im trying to dispose of JDialog but for some reason it doesnt work in any way i use it, im working on lottery in the first window i want to add created tickets and in jdialog i want to choose which ...
CaptainAlpacaus's user avatar
0 votes
1 answer
48 views

JDialogue's components won't show up before while loop ends

I am currently building a RPG game using built-in GUI and is trying to display a simple fight scene on a JDialogue. My partial code are as follows: public void setupFight(Character c) { ...
Tony Chai's user avatar
-1 votes
1 answer
45 views

Attempting to place JDIalog on top of current position of a JFrame

I'm writing an extension to a Java application; its API does not have access to the position of the main window of the application. I create my own JFrame, and it positions that JFrame with AwtUtil....
arcy's user avatar
  • 13.1k
0 votes
1 answer
34 views

How to get JList getSelectedValue() to return a Class Object?

I am using a JList that contains Objects of Houses with addresses. The Houses are in a TreeMap (Not sure if that was the best choice) in a Neighborhood class. I am using Map.Entry and .entryset() to ...
chalcedony's user avatar
0 votes
1 answer
39 views

Adding a JFXPanel to a swing application makes swing components small

I have been prototyping an idea I have for an app, but as I'm a better Swing developer than app developer, I am doing it using Swing. I wanted to allow it to embed a video using JavaFX MediaPlayer/...
TinaBo13's user avatar
0 votes
2 answers
76 views

Is it possible to override the implementation inside the generated actionPerformed in java?

I'm using a NetBeans as my IDE for Java. I have class called NewSchoolYearDialog extended by JDialog: The purpose of that Save button in the image above is to insert a school year into a database. ...
totski's user avatar
  • 19
0 votes
0 answers
26 views

JDialog renderng issue with blocked operation

An application should display a modal information dialog (JDialog class) after the user has entered their login credentials. This is needed because, in the case of first login or reset profile, the ...
snx's user avatar
  • 61
0 votes
1 answer
26 views

How to stop a method from running and run this method instead

It is a jdialouge project on netbeans and the methods are program of an 3 analog clock with assigned themes named classic, candy, cyberpunk, and there are buttons that will call each method where the ...
Christian's user avatar
-2 votes
1 answer
58 views

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 ...
siggemannen's user avatar
  • 8,960
0 votes
1 answer
161 views

How to make a JDialog work on a JFrame that is fullscreen

I'm writing a program using Swing and AWT and I have a JFrame that is fullscreen. On said frame I have a button that opens a JDialog on that frame. When I click the button it does create the jDialog ...
computer_goblin's user avatar
-1 votes
1 answer
87 views

How do I use a Main class to implement Swing Components from other classes in my project? [closed]

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 ...
Evan's user avatar
  • 45
-2 votes
1 answer
147 views

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 ...
James's user avatar
  • 3
1 vote
1 answer
332 views

Create a Jdialog that has an icon just like joptionpane

I have a extended JDialog for a custom dialog because it's a bit complicated and I can't create it with JOptionPane but my issue is I still want to add to the JDialog the same icons that JOptionPane ...
Girl Codes's user avatar
0 votes
0 answers
48 views

Java Swing JDialog - how to modify after it is displayed? [duplicate]

I am working on a Java Swing application with JDK 11. I have a requirement that the dialog should always be on top, with minimal content when it is out of focus. But when the user interacts with the ...
Vikas's user avatar
  • 876
0 votes
1 answer
72 views

How does java dialog inheritance work? I lose some properties

Sorry I don't have much knowledge about Java or swing applications. I created a dialog called DlgShape and in it i have 2 text fields, 2 buttons and 2 labels. I tried creating DlgRectangle and instead ...
Ethereallie's user avatar
-1 votes
1 answer
215 views

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 ...
Intern's user avatar
  • 1
0 votes
0 answers
37 views

How can I block JDialogs from appearing until a previous JDialog is closed?

I'm making a game in Java Swing and my level-up menu is a JDialog. On rare occasions it's possible for the player to level up twice in a short period of time, leading to level n's then level n+1's ...
devor110's user avatar
  • 141
0 votes
0 answers
18 views

Customizing JOptionPane in Java Swing [duplicate]

I'm developing a GUI, where I need some pop-up windows with a customized design, for example, the client can add a product to an order by filling a form, and this form will be in a pop-up window with ...
Alexss_1902's user avatar
0 votes
1 answer
150 views

How I can use an auto increment in java for a register system? [closed]

I'm creating a register system for students using files, while I use the program the auto increment works fine, but when I ruin it again, the autoincremnt returns 1, also I am not allowed to use ...
Web777Ms's user avatar
0 votes
0 answers
45 views

How to jdialog to jpanel thread process

I have a question. I couldn't solve it for 4 days. I'm making a stopwatch using gui swing in Java. There are 1 jframe and 1 jdialog. I used threads in Jframe. It has a start stop and reset button, it ...
RaRe's user avatar
  • 1
0 votes
1 answer
37 views

Jdialog disappears before usable

I have a strange problem: From a MenuBar I (or the user) can call two actions. One does importing some data, the other deletes some data. Both are presented through a JDialog. Now the weird thing is ...
Quamatoc's user avatar
-1 votes
1 answer
64 views

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 ...
Luís Ambrozin's user avatar
1 vote
1 answer
235 views

Why does this JDialog not draw properly when called from a JFrame?

I'm having a problem with the display of a JDialog when called from a JFrame. The JFrame only contains a button. When pressed, this launches a JDialog with a JLabel, JTextField and JButton. The JFrame ...
Paul Walker's user avatar
  • 2,726
0 votes
0 answers
55 views

Block input while JDialog is open

I've a program that, when I open an image with JDialog, the consoles freezes, as expected, but if I write on the console while frozen, the scanner will catch what I typed, after I close the image, the ...
asrhiphop's user avatar
0 votes
0 answers
31 views

Prevent JPopup from going behind without the need for AlwaysOnTop()

I have a dialog that will open another dialog, is there anyway to keep the opened dialog on top of the main dialog without setting always on top? Example: JPopupDialog mainDialog = new JPopupDialog(&...
Cherple's user avatar
  • 791
0 votes
1 answer
284 views

Is there any way i can refresh a JDialog and remake it?

I have one main JFrame with one button, when i press this button, one JDialog open with some objects from a Json File. For each object i have a delete button. Everything works great but to see all ...
Spaliaras4k18cm's user avatar
0 votes
0 answers
208 views

Dialog X/Y positioning

I want to display some user info relative to a mouse click. I converted a JOptionPane into a JDialog to accomplishment this. However, when invoking the message display, I have to pass evt.get?...
William Brandley's user avatar
0 votes
1 answer
163 views

Cannot set maximum height of JEditorPane inside JScrollPane inside JDialog

So I want to achieve something very simple. In my application, users can consult the content of some files. First of all, the content of the files is in HTML, so I used JEditorPane to display it. ...
Mo Ben's user avatar
  • 11
0 votes
0 answers
270 views

Properly adjusting the height of a JDialog to screen size

I have a JDialog and I am trying to adjust it to the size of the screen. I am using the setPreferredSize Method of the JDialog. Without me using the method, everything looks fine unless the screen is ...
NoChance2's user avatar
0 votes
0 answers
46 views

Creating JDialog in actionperformed

I'm working on a swing application for reading a JSON file and then writing the same to a file. Action items will be listed in a JTable row that shows the metadata of the file and the last column of ...
kallada's user avatar
  • 1,899
0 votes
0 answers
69 views

MousePressed / MouseReleased events for user resizing (dragging) JDialog border

I am trying to figure out when users have resized my JDialog, because I want to make it snap to certain size steps after that. And I need to distinguish that from resize events caused by programmatic ...
Philippp's user avatar
  • 857
0 votes
1 answer
32 views

JDialog.dispose() closes box but not the app. Clicking the corner cross closes both

NetBeans 12.3 / Java 15.0.2 / Ubuntu 16.04. I created a Maven/Java app in NetBeans having just a JDialog with a single button which calls dispose(). Run it in NetBeans. If I close it with the cross in ...
RichEarle's user avatar
0 votes
1 answer
327 views

Java swing: which component handles the mouse event to resize a JFrame or JDialog

Java 8 on windows 10. I have a resizable JDialog. I have tried the following code to see if I can capture the mousePressed & mouseReleased event when the mouse cursor changes shape at the edge of ...
H.Sheng's user avatar
  • 441
0 votes
0 answers
58 views

JDialog under both Nimbus and Metal look and feel too wide

I have two simple JDialog dialogs that should be small. The first has a JTextField of 5 columns and a vertical slider under it. The second has a JLabel, a JSpinner and two JButton(s). Both, after ...
user12438479's user avatar
3 votes
1 answer
289 views

Hidden JDialog still visible in Windows 10 taskbar peek preview

A JDialog configured with HIDE_ON_CLOSE becomes invisible after closing it. But it is still visible in the peek preview of the Windows taskbar. The preview is corrected only after the main window is ...
Stefan S's user avatar
0 votes
0 answers
206 views

Is there a way to stop an invokeLater or to create a JFrame at a certain time?

I am working on a little project, which in this example is made of 2 classes (and windows). Basically, when I click on a button placed on the JFrame 1, it open a JDialog, and then start the treatment ...
VassiliKan's user avatar
0 votes
1 answer
658 views

How to limit the dimensions of a JDialog

I'm working on a JDialog subclass (let's call it PendenciesDialog) which shows an arbitrary number of equally sized, vertically stacked JPanels to the user (minimally one) and a close button below ...
Piovezan's user avatar
  • 3,225
0 votes
1 answer
74 views

JDialog only load at the end of the program

I am using a JDialog for a project, which is load when I click on a button located inside a JFrame. This JDialog is supposed to display an image, but the image appears only when the code called by the ...
VassiliKan's user avatar
1 vote
0 answers
32 views

Is the Icon buffered? [duplicate]

When I click on "Show dialog" button, it appears a JDialog that has a JLabel with an Icon (image), if the file "C:\Test\Test.png" exists the image appears correctly. I have an ...
Aislan Nadrowski's user avatar
0 votes
2 answers
954 views

Can't load an image when running a jar from maven project

I saw that this question has been asked many times, but I didn't find any solutions that works in my case. I am trying to load an image and display it on a JDialog. That works when I am running the ...
VassiliKan's user avatar
0 votes
1 answer
120 views

JDialog is not showing up

I have this problem over and over again when i call my JDialog class is not showing anything this is the code for the JDialog interface: public JMovie() { JFrame f = new JFrame(); JDialog ...
kotsios theofanous's user avatar
0 votes
1 answer
975 views

Opening a Dialog from a MenuItem in Swing and validating that dialog before closing

I am somewhat new to UI Development in Java and Swing. I would like to open a dialog when I click an item in my JMenuBar and then validate that dialog before closing it (so pressing the X or the ok ...
krise's user avatar
  • 535
0 votes
0 answers
118 views

Set tooltip text to close button of a JDialog

I programmed a JDialog to exit with ESC key and I would like to add a tooltip to the exit button that says "Close with ESC key", so that the user knows about it. Does anybody knows how to ...
user3375943's user avatar
0 votes
1 answer
112 views

two dialogs setAlwaysOnTop(true): the second generated one is behind the first one

I have a JDialog which can generate another one. The two JDialogs have the property setAlwaysOnTop(true) and aren't modal. The second Jdialog generated from the first one appears always behind. I ...
Skartt's user avatar
  • 581
0 votes
1 answer
56 views

How to get JDialog textFiels Value from JFrame

Hi I am new in Java coding and trying to design a user friendly desktop App with the help of JFrame and JDialog - My JFrame is - package com.myapp.ui; import java.awt.BorderLayout; import java....
Amar Das's user avatar
0 votes
1 answer
155 views

Declaring a JDialog that has already been created

This question might not make any sense, because I am incredibly confused. I am creating a UI using Swing in Netbeans. I have created a Dialog box by using the Swing UI. I want to open this Dialog when ...
David's user avatar
  • 9
0 votes
0 answers
161 views

Change look and feel for JFrame after clicking on button from jdialog [duplicate]

I have a simple Java Swing app which should be able to change its look and feel (UIManager) afer clicking on a JButton in a JDialog of this JFrame. When I simply set UIManager.setLookAndFeel from ...
The1NOnly's user avatar

1
2 3 4 5
21