swing - Jbutton too big java -
i'm having hard time jbuttons, , have 2 problems.
the first have set proportions in frame
gridbaglayout
set size ofjpanel
. nothing strange far. program shows space in panel want add should stay. have 20 disposed in space, fitting dimension , respecting proportions. when createdjpanel
buttonsgridbaglayout
,weightx
,weighty
set1
, result new grid went out space wanted fit in , program showed before.
why don't buttons resize fit space while otherjcomponents
(likejlabel
s,jtextfield
s , horizontal/vertical struts) do?the second question regards button text dimension. buttons have default font, when try enlarge text size, buttons show "
...
", despite there space larger text dimension. how can fix this?
thank in advance.
ps: think first problem depends on second.
edit:
thought, first problem derived second. found method solve second problem , works. yay!
Comments
Post a Comment