Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Window/mouse hangs and flickers

Open
#213 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
java
Domain
frontend, testing

Research direction

Start with the example repository's SimpleCopyApplication.java and SimpleCopyApplicationTest.java, then reproduce the empty-JFrame case on Windows 10. Compare it with the unchanged example to isolate the window and mouse hang or flicker, and review the documentation around testing ordinary Swing components and the newLabel("name") helper. Done means the example opens and can be tested without the reported interaction problem, with the usage guidance clarified.

Written by the indexing model from the issue text.

Description

invalid question Windows 10

Sorry for opening this issue. I have read your documentation a couple of times and I am pretty new to Java Swing and AssertJ. The problem that arises is, that AssertJ Swing simply cannot test my GUI because it does not even open the window properly.
I have tried to narrow this error down. Therefore I have pulled your example repository with the SimpleCopyApplication.java and the according SimpleCopyApplicationTest.java.

Just out of the box this setup works for me. But now the strange part comes in.
As soon as I simply delete everything out of the frame. so that there is just an empty JFrame left, the window and mouse hangs and the mouse starts flickering (it possibly moves pretty fast). I do have the same problem with my application even if the GUI contains something.

So in your example code i have just deleted everything out of the SimpleCopyApplication Constructor:

  public SimpleCopyApplication() {

  }

Can someone reproduce this error?
System: Windows 10

Here is a screenshot of the problem. And I cannot move my mouse for a couple of seconds:
2017-08-01 22_02_07-

And just one more question for my understanding:
To properly use your testing framework I also have to use your methods to create Labels/Textfields and so on? For example to create a Label I cannot instatiate a normal JLabel and test it, I need to use your function newLabel("name")? Maybe this is related to the fact that I am a beginner, but I did not get this just out of your documentation. It seemed to me that I can use my finished Swing GUI and just test it without any modifications. Especially because the quick start did not mention anything of it.

Thank you very much for your support and your work at AssertJ.

Dominant language
Java
Stars
121
Forks
52
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from assertj/assertj-swing

All issues in assertj/assertj-swing

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.