Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8967657
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:17:37+00:00 2026-06-15T17:17:37+00:00

I need to fix the screen location of the Open Source Java Application Angry

  • 0

I need to fix the screen location of the Open Source Java Application “Angry IP Scanner” on OSX (https://sourceforge.net/projects/ipscan/) at startup.

If you start the application and move it to the extended space of a secondary monitor (Non mirrored) and do one of two things: 1) Unplug your secondary monitor with the app running or 2) quit the app while it is located on the secondary monitor.

If you unplug the second monitor and then start the app, the app loads and places the screen on the now nonexistent 2nd monitor, even though it is not plugged in.

To get to the screen back to the main screen area you MUST plug in a 2nd monitor and move it back to the main screen. Then you can unplug the second monitor and have no problems.

When the app is starting, I think the app needs to check the current screen size verses the previous screen size and if it has changed, place the screen near the 10,10 location so it will show up on the main, hopefully active screen.

In my searching on Stack Overflow, it appears you can find the current screen information like this:

GraphicsDevice gd = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
int width = gd.getDisplayMode().getWidth();
int height = gd.getDisplayMode().getHeight();

How could I save this to a file and recall/compare the previous to the current data, if it has changed, move the application’s window to the 10,10 location?

I am a beginner writing iOS and Ruby on OSX, but have not done any Java. I love the program, but this bug is killing me and there doesn’t appear to be anyone actively working on the code.

Anyone want to help?

BTW … It is bug 84 at the Angry IP Scanner website.

Maybe someone could explain how I could run the following code snippet from the cli?

int resolution =Toolkit.getDefaultToolkit().getScreenResolution();
System.out.println(resolution);

Thanks,

padapa

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T17:17:38+00:00Added an answer on June 15, 2026 at 5:17 pm

    Something like:

    public class ShowMeTheScreenSize {
    
        public static void main(String[] args) {
            EventQueue.invokeLater(new Runnable() {
                @Override
                public void run() {
                    System.out.println("VirtualBounds = " + getVirtualBounds());
    
                    for (int index = 0; index < getScreenDeviceCount(); index++) {
                        System.out.println("[" + index + "] Device bounds = " + getScreenDeviceBounds(index));
                    }
    
                    System.exit(0);
                }
            });
        }
    
        public static int getScreenDeviceCount() {
    
            GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
    
            return ge.getScreenDevices().length;
    
        }
    
        public static Rectangle getVirtualBounds() {
    
            Rectangle bounds = new Rectangle(0, 0, 0, 0);
    
            GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
            GraphicsDevice lstGDs[] = ge.getScreenDevices();
            for (GraphicsDevice gd : lstGDs) {
    
                bounds.add(gd.getDefaultConfiguration().getBounds());
    
            }
    
            return bounds;
    
        }
    
        public static Rectangle getScreenDeviceBounds(int index) {
    
            GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
            GraphicsDevice lstGDs[] = ge.getScreenDevices();
    
            return lstGDs[index].getDefaultConfiguration().getBounds();
    
        }
    }
    

    Which outputs…

    VirtualBounds = java.awt.Rectangle[x=0,y=0,width=3840,height=1200]
    [0] Device bounds = java.awt.Rectangle[x=0,y=0,width=1920,height=1200]
    [1] Device bounds = java.awt.Rectangle[x=1920,y=0,width=1920,height=1200]
    

    On my machine

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to fix CurrentCulture as the invariant culture in an ASP.NET application. How
I have this posted here: https://getsatisfaction.com/pixelandtonic/topics/wygwam_not_styled_in_cp_entry_and_not_functioning_shown_errors_attached ...but I really need a fix asap if
I need to fix a issue for xss vulnerability. the code segment is below.
I need a fix for this. here is just part of my code <?php
I have a listview, and I need to fix the column width of the
I need to lower my received sequence number for performing FIX certification to check
I really need some help with this as I have been trying to fix
I'm getting a compile errors, that I can't really fix. I need to create
I'm trying to have a full screen UI with a fix header ( a
The application is of MFC. Sometimes I need to activate the window and display

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.