atarw / material-ui-swing

A modern, Material Design UI for Java Swing
MIT License
653 stars 86 forks source link

ActionListener not firing #84

Closed itsTyrion closed 4 years ago

itsTyrion commented 5 years ago

After setting the material l&f, a JTextField's action listener doesn't seem to fire when pressing return for me. commenting the setLookAndFeel part out resolves the issue.

snippet https://pastebin.com/g2q4gMN5 (I removed anything not explicitly needed for this gh issue)

vincenzopalazzo commented 5 years ago

HI @itsTyrion,

We work on the version 1.0 in this and in this branch, you tried the last version, can you try your code in with the last update, please?

itsTyrion commented 5 years ago

Same thing. :/ tried the compiled beta 1.0 jar) Hitting return does for some odd reason not fire an ActionEvent, the JButton is working, though. Edit: The del key doesn't do anything either (for me). Tested with a very old version I had laying around, 1.0 beta and the last stable version.

I'm in a Manjaro (Arch) + deepin DE w/ kernel 5.1.8, if that helps (maybe it's not a thing on Windows?)

vincenzopalazzo commented 5 years ago

@itsTyrion Thanks so muck, we will find the problem, thanks

vincenzopalazzo commented 5 years ago

Hi @itsTyrion I ran your code and I work well if you submit with enter the JTextField in the console printed the aaaaaaa. If you want that print aaaaaaa on click you must add a MouseListener.

@atarw can you close the issue please, if you can

itsTyrion commented 5 years ago

What do you mean? For me, it does not work as it should. “it does not fire when I press enter” and “del doesn’t work” Why would I need a mouse listener for that? o.O

Are you running it on windows? If so, it could be a very weird platform dependent glitch.

vincenzopalazzo commented 5 years ago

@itsTyrion, when I press, enter in the my Demo worked on Linux, now I will try with windows

Tests result

Which version Java you used?

Can you give me a minimal example execution with the additional information on how the java version? because I can not be reproducing the bug, sorry

Update answer I have reconstruction your example and I have compiled with java8 and run with java11, this is the result Selection_075

and this is the jar, can you test it, please?

libs.zip

itsTyrion commented 5 years ago

Sooo. I finally got the time to test it. At first: Please exucde my rudesness in the previous reply, I didn't have your name as the dev name in my head and thought it was just some know-it-all 2nd: It IS working with the current stable, and the current beta version. I had a REALLY old version of Material UI Swing stuck in IntelliJ (I started the project ages but lost time and interest) and it seems like it was overriding the new version. And because I added the old jar under "Project Structure -> Modules -> Dependencies", it didn't show up under "Project Structure -> Libraries", which is why I didn't see it. Sorry for wasting your time. image

Nice work, thanks for making this, keep going^^

p.s. One thing I noticed with the beta jar: The scrollbar in a JScrollPane set to ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS behaves like ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED. (I thought I might ask if this is intended before opening an issue for the beta). And the font doesn't look as smooth and clean as in 0.9 (or earlier, with Roboto) (visible on your screenshots).

vincenzopalazzo commented 5 years ago

Hi @itsTyrion,

I'm heppy that the your version work well.

Don't worry

At first: Please exucde my rudesness in the previous reply, I didn't have your name as the dev name in my head and thought it was just some know-it-all

Thanks so much

Nice work, thanks for making this, keep going^^

Sorry if do this question but can you give me an example for this problem?

The scrollbar in a JScrollPane set to ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS behaves like ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED.

The font Roboto was been removed for resolve this issue now the font is the noto sans and whit some SO has the problem with display, this my pull request tried to fix the problem. On linux, this problem is more evident.

Thanks for your support :)

vincenzopalazzo commented 5 years ago

@atarw can you close this issue, please? because of this PR fix it

vincenzopalazzo commented 4 years ago

Hi @itsTyrion, I'm linking an issue to the purpose to set a personal Font with MaterialTheming System https://github.com/vincenzopalazzo/material-ui-swing/issues/87.

I hope it resolves your problem