Hello,
I have created a form with couple of buttons & other components in GUI designer. In before* event of the form, I try to change the height of 2 buttons. NOTE I want to change height of just 2 specific btns and not all buttons - so setting in Theme wont be preferred. I tried :
setPreferredSize(new Dimension(300, 20));
With this, the size is set accordingly, but (1) the btn is rectangle - rounded borders are lost (2) their seems to be the original size border line around the button.
I tried
This makes the Width also tiny - giving a tiny square of 20*20.
Tried adding below line along with PreferredH :
This brings the btn on next line - size of btn must be wider than the screen size. With 250 as W, It came in same line, but the line is visible in middle in some skins of simulator.
Why is this difference ? Why does the border line appear on using PreferredSize() ? How to solve this ?