I have a button in Java (which includes text and an icon), but with a default border, the border (a border outside the text and icon) is quite long, since I can set a custom jbutton border (width, length). So far i tried
button.setSize(x, y);
but that will not work.
Thanks.
I may be wrong, but you can set the JButton border as follows:
Border border = new LineBorder(Color.WHITE, 12); JButton button = new JButton("12 Pixel"); button.setBorder(border);
Perhaps you should take a look at the LineBorder documentation .
setLayout(null); setPreferredSize(new Dimension(950, 550));
which worked for me, just resize to your liking ... goodluck hopes this works! just noticed the date. sorry for the grave maybe this will help someone else though lol
Source: https://habr.com/ru/post/1397811/More articles:Magento - Custom criteria based implementation constraints - phpAsp.net MVC - return to host controller using partial views - asp.net-mvcHow to render an alternate child view in MVC? - asp.net-mvchtmlhelper inside webgrid - asp.net-mvc-3Select Distinct month and year from timestamp mysql field and echo in php - phpHow to hide header on MVC3 WebGrid - asp.net-mvc-3How to submit multiple duplicate forms from one page to Rails - preferably with a single button - ruby-on-railsIs there a way to debug an Android application on a phone without a USB connection? - androidHow can I hide a WebGrid column based on the current user role? - asp.net-mvc-3PayPal Python Payment Request ClientDetails - pythonAll Articles