swing - Jbutton too big java -


i'm having hard time jbuttons, , have 2 problems.

  1. the first have set proportions in frame gridbaglayout set size of jpanel. nothing strange far. program shows space in panel want add should stay. have 20 disposed in space, fitting dimension , respecting proportions. when created jpanel buttons gridbaglayout , weightx , weighty set 1, result new grid went out space wanted fit in , program showed before.
    why don't buttons resize fit space while other jcomponents (like jlabels, jtextfields , horizontal/vertical struts) do?

  2. 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

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -