Comments (5)
Following lines cause the problem:
spinner.getSize()
always returns 0, 0
because the spinner was just created and is not yet layouted.
So the preferred height of the spinner becomes 0
, which FlatLaf does not like.
Probably a bug in FlatLaf. Will investigate...
Anyway seems that the intention of the above code is to limit the preferred width of the spinner.
Replacing spinner.getSize()
with spinner.getPreferredSize()
should fix the issue.
from scijava-ui-swing.
Thanks for the suggestion, @DevCharly. I can confirm this fixes the issue, and opened #78.
from scijava-ui-swing.
This issue has been mentioned on Image.sc Forum. There might be relevant details there:
https://forum.image.sc/t/missing-spinner-buttons-with-flatlaf-look-and-feel/72185/2
from scijava-ui-swing.
FYI, I actually don't think (I could be, of course, wrong - I did not test any other L&F) limiting the preferred width of the spinner is needed. Things seem to work fine if one leaves it to defaults. Maybe this is just some historic code that has been carried over!? On #79, I have a couple of proposals on things that I found when looking into this.
from scijava-ui-swing.
FYI, I actually don't think (I could be, of course, wrong - I did not test any other L&F) limiting the preferred width of the spinner is needed. Things seem to work fine if one leaves it to defaults
I was wrong of course. The rationale for this is explained here: #79 (comment)
from scijava-ui-swing.
Related Issues (20)
- Support html hyperlinks in labels and messages
- Fix procedure of how to create update site HOT 1
- Respect multiple styles in chooseFile and chooseFiles methods
- No parameter attribute for number formats HOT 1
- Warning status popup displayed twice
- SwingFileWidget: support 'pattern' style HOT 1
- Harmonize file filter logic for File inputs
- SwingFileWidget: support copying from widget text
- Add FlatLaf as a L&F option HOT 1
- Unusable viewport in tables
- Allow showing file list widget instead of file chooser HOT 3
- Add test for stepSize=null
- Move non-Swing-specific object handling upstream HOT 1
- Improve scroll behavior in Swing input dialog HOT 5
- NPE from SwingObjectWidget HOT 7
- Console Menu bar is not aware of Log tab
- Migrate SwingGroupingInputHarvester to from sciview
- Implement FileListWidget.FILES_AND_DIRECTORIES also for FileWidget HOT 4
- Implement an input widget for URIs HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scijava-ui-swing.