- In the extension bar, click the AdBlock Plus icon
- Click the large blue toggle for this website
- Click refresh
- In the extension bar, click the AdBlock icon
- Under "Pause on this site" click "Always"
- In the extension bar, click on the Adguard icon
- Click on the large green toggle for this website
- In the extension bar, click on the Ad Remover icon
- Click "Disable on This Website"
- In the extension bar, click on the orange lion icon
- Click the toggle on the top right, shifting from "Up" to "Down"
- In the extension bar, click on the Ghostery icon
- Click the "Anti-Tracking" shield so it says "Off"
- Click the "Ad-Blocking" stop sign so it says "Off"
- Refresh the page
- In the extension bar, click on the uBlock Origin icon
- Click on the big, blue power button
- Refresh the page
- In the extension bar, click on the uBlock icon
- Click on the big, blue power button
- Refresh the page
- In the extension bar, click on the UltraBlock icon
- Check the "Disable UltraBlock" checkbox
- Please disable your Ad Blocker
- Disable any DNS blocking tools such as AdGuardDNS or NextDNS
- Disable any privacy or tracking protection extensions such as Firefox Enhanced Tracking Protection or DuckDuckGo Privacy.
If the prompt is still appearing, please disable any tools or services you are using that block internet ads (e.g. DNS Servers, tracking protection or privacy extensions).
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