Use properties Like, border, margin and fillXXX to make it like that on toolBar.
How I can customize a button using java swing? [closed]
-
10-10-2022 - |
Вопрос
How I can customize a button and to have it on a display panel in the same way as in a tool bar.
What I really want is to add a button to a panel, and that look like to tool bar button. I tried copying the button on the toolbar and pasting it into the center of the panel and shows what happened the previous image.
Решение
Другие советы
There are other Swing objects for toolbars which you may find more suitable than trying to add a button. See here: http://docs.oracle.com/javase/tutorial/uiswing/components/toolbar.html
Не связан с StackOverflow