- 0
Java: Prevent opening duplicate dialogs
-
Recently Browsing 0 members
- No registered users viewing this page.
-
Posts
-
-
By Brian Miller · Posted
Does the 4TB Crucial X10 still have the Data corruption issues that plague the previous generations? -
By zikalify · Posted
Is the Start menu needed? Yes. Is it needed in its current form? No. I run lubuntu, it has all my apps sorted into categories, a bunch of preferences and system tools, the option to turn off, and search. It's all in a small rectangle and does everything you need it to. -
By LoneWolfSL · Posted
Star Citizen Alpha 4.2 update lands with radiation hazards, dynamic rain, and more by Pulasthi Ariyasinghe The crowd-funded sci-fi RPG Star Citizen has received another update to its public alpha build. This time, developer Cloud Imperium Games has delivered new features like radiation as a brand-new hazard, irradiated creatures, the first implementation of a dynamic weather system for planets, and more. Dubbed Storm Breaker, Alpha update 4.2's cinematic trailer can be caught above, showing off the new sandbox activity. Storm Breaker is the name of the new sandbox activity too, continuing the ongoing Regen Crisis narrative. Players will be going to Pyro 1 and 4 while uncovering the experimentation secrets of the Associated Sciences & Development company while also weathering a never-ending storm, irradiated zones, and dangerous creatures to complete the event's tasks for hard-earned loot. Speaking of radiation, players will need to wear specialized gear and navigate carefully whenever they come across these special hazardous zones on planets. "This update adds new Radiation accumulation, resistance, and falloff thresholds to player status effects," says the developer. "These effects will appear as new visual and player status cues with REMs on the HUD and can cause consequences resulting in player injury or death if not treated." Locations on Stanton and Pyro planets can now have rain happen on them at various locations and times. Cloud Imperium calls this the first implementation of its Genesis: Dynamic Weather system. When ready, the full version of this tech will be rolling out to many more planets and will supposedly have rain and cloud formations, lightning, relevant audio, water pooling, and clothing shaders for wetness. Other changes of the update include better missile and torpedo tracking, new explorable locations, irradiated juvenile sandworms to fight, fixes for space stations and landing zones to reduce clipping and glitches, and much more. The complete release notes for the update can be found here. Star Citizen Alpha 4.2: Storm Breaker is now available for all backers in the Live channel. -
By Tuskd · Posted
I envy EU residents... in a good way
-
-
Recent Achievements
-
Wayne Robinson earned a badge
Week One Done
-
Karan Khanna earned a badge
One Month Later
-
Karan Khanna earned a badge
Week One Done
-
MikeK13 earned a badge
First Post
-
OHI Accounting earned a badge
Week One Done
-
-
Popular Contributors
-
Tell a friend
Question
iczman
I'm working on a java project that it has a menu where you can click File > Login to pop out a dialog for user to enter their login info.
My problem is, when the login dialog is present, user and focus back to the main JFrame and select File > Login to pop out another dialog. I'm searching for a way to prevent this from happening. So far I thought about two solutions but I don't know which is the best way to go about solving this kind of issue:
Solution 1: In my customzied JFrame class, declare a boolean that holds the visibility of the login dialog. Whenever the user goes File > Login, it will first check to see if it's already visible or not, then open the dialog if it's not already opened.
Solution 2: Prevent user to set focus back to the main JFrame when the dialog box is opened.
If you were me, how would you approach this problem? And which one is more effective or a common practice?
Link to comment
https://www.neowin.net/forum/topic/434096-java-prevent-opening-duplicate-dialogs/Share on other sites
8 answers to this question
Recommended Posts