Does any one know how to resize the JButton? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Does any one know how to resize the JButton?

Currently I'm studying the GUI from java swing, I wish to resize the button but it can't, thanks for people who can help me

3rd Mar 2017, 1:04 PM
Jin Xian Tan
Jin Xian Tan - avatar
4 Answers
+ 2
You can use the method .setSize(), but you should use .setPreferredSize() method.
3rd Mar 2017, 1:35 PM
Jacob C.
Jacob C. - avatar
0
You really need Java Swing? It is better change to JavaFX!
3rd Mar 2017, 1:43 PM
Thiago
0
need to using .setPreferredSize() first?
3rd Mar 2017, 2:09 PM
Jin Xian Tan
Jin Xian Tan - avatar
0
what are the difference between java swing and javaFX?
3rd Mar 2017, 2:10 PM
Jin Xian Tan
Jin Xian Tan - avatar