java - How to resize jdialog buttons? -


here's code:

joptionpane pane = new joptionpane(findarray, joptionpane.question_message, joptionpane.default_option); pane.setoptions(new object[]{findpreviousbutton, findnextbutton}); final jdialog dialog = pane.createdialog(myjframe, "find"); dialog.setdefaultcloseoperation(jdialog.dispose_on_close); dialog.setvisible(true); 

findarray consists of jlabel findlabel , jtextfield findfield. myjframe jframe. findpreviousbutton , findnextbutton 2 jbuttons replacing default "ok" , "cancel" buttons with. both have custom icons , no text. jdialog window making icons size making them pixelated. how resize buttons width 60 , height 30? method .setsize(int, int) doesn't work , neither .setbounds(int, int, int, int)

adjusting button margins should help: http://docs.oracle.com/javase/7/docs/api/javax/swing/abstractbutton.html#setmargin(java.awt.insets)


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -