GithubHelp home page GithubHelp logo

dj-raven / glasspane-popup Goto Github PK

View Code? Open in Web Editor NEW
14.0 1.0 3.0 436 KB

glasspane popup ui java swing

License: MIT License

Java 100.00%
desktop-application java java-components javaswing swing-gui ui

glasspane-popup's People

Contributors

dj-raven avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

glasspane-popup's Issues

Decimal Format in Popup

Hi,

your use of DecimalFormat can depend on PC settings of a user. So it can put "," instead of "." for decimal separator.
private final DecimalFormat df = new DecimalFormat("#.###");

You can use this:
private final DecimalFormat df = new DecimalFormat( "#.###" , DecimalFormatSymbols.getInstance( Locale.US ) );
to avoid that bug.

Error when opening and closing the Popup too quickly

Hello Raven, I love you very much uvu, thank you for your contributions, I saw potential in this repository to have something similar to those messages as android and experimenting with it I have run into a problem.

When opened and closed very quickly it throws a small exception.

Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Component must already be added to parent!

and something like this happens:

20231011_042748.mp4

Inspecting the code, I see that it originates from the Popup class in the initAnimator() method and the problem is this line of code:

layout.setComponentConstraints(component,lc);

At first I thought that if I checked that it was already being managed by the layout with the isManagingComponent method it would be solved, but it was not the case, reviewing the code further I saw that the method uses a map to save each component with its respective constraint and this would work well, if it were not for the fact that it is inside an animator and this changes constantly...
So I relied better on the setConstraintMap method to maintain the same map within the animation, so I changed the problem line of code to this one.

layout.setConstraintMap(Map.of(component,lc));

and the problem was solved:

20231011_044535.mp4

And yes, I click very fast ๐Ÿฅฒ

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.