سؤال

How I can customize a button and to have it on a display panel in the same way as in a tool bar. enter image description here

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.

هل كانت مفيدة؟

المحلول

Use properties Like, border, margin and fillXXX to make it like that on toolBar.

نصائح أخرى

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

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top