Java reuse Dimension objects when setting component size
-
30-10-2019 - |
Question
Is it contraindicated to use several presetted dimension objects to set the preferred size of non resizable components on the screen. E.g.: two textfields both should be 80x20 px so:
Dimension d = new Dimension(80, 20);
tf1.setPreferredSize(d);
tf2.setPreferredSize(d);
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow