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 8624627
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T07:34:35+00:00 2026-06-12T07:34:35+00:00

I am trying to develop an application in Java (Swing) that lets me overlay

  • 0

I am trying to develop an application in Java (Swing) that lets me overlay a grid on the screen, and be able to click things behind the grid — say, an icon the desktop for example.

Would I approach this problem with a Transparent JFrame or a Transparent JWindow?

Whatever I use, the transparent window/frame needs to

  • always be on top.
  • occupy the entire screen.
  • register every click with a mouse listener.
  • record the coordinates of the clicks on the screen.
  • allow me to use the Graphics class to draw a grid on the screen, and other elements, like numbers or images, that should also be click through.

Any direction would be appreciated.

Apologize if I haven’t been specific enough, but I haven’t found a demo window or frame that can do all these things. There’s an example here and another here — but I don’t know how to use WindowUtils in Eclipse. This is my first time in GUI development and I’ve never used external libraries aside from the base Java classes.

  • 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-12T07:34:37+00:00Added an answer on June 12, 2026 at 7:34 am
    • on top: Frame.setAlwaysOnTop() should work for you
    • full screen: Setting the window size to the display size will make it occupy the entire screen
    • events and overlay painting: The actual behavior may vary by platform, but typically if you’re using an alpha component to draw into your window, and your window is nominally transparent, those areas not painted (or sometimes those painted below a certain alpha threshold) will pass events through to whatever applications, windows, or components are underneath.
      If you capture events, you then have to re-introduce them to whatever window is below yours, which is non-trivial. If you don’t capture events, you need to install an OS-specific event handler to capture events of interest.

    JNA’s WindowUtils.setWindowTransparent() should provide the paint/event behavior required, or you can use the AWTUtils equivalent provided in more recent JVM releases.

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

Sidebar

Related Questions

I'm trying to develop an application in Delphi XE2 that will be able to
I was trying to develop a stockManager application in java swing with MySQL .While
I'm trying to develop a Java RMI application and found out that it's not
I am trying to develop a Java EE application that connect to an Oracle
I'm trying to develop a DHCP client application in java that can receive DHCP
I'm trying to develop a Java web based application that can work flow different
I am trying to develop an application with eclipse (java swing) and I wonder
I'm trying to develop a little drag & drop application under Java FX. User
I was trying to develop the application that count the line of code my
I am trying to develop an application that uses a number of images that

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.