java - How to set the distance between line border and edge of window? -


you know how when dopanel.setborder(borderfactory.createtitledborder(txt)) creates border, , if that's panel in window, there space between border, , edge of window.

but if panel2.setborder(borderfactory.createlineborder(color.lightgray, 1)) borer gonna touching edge of window.

question

how change distance between lineborder , edge of window

comment if not clear enough

the borer gonna touching edge of window....how change distance between lineborder , edge of window

you can nest borders using compoundborder. example, create 'padding' border around line border:

compoundborder cb = new compoundborder(borderfactory.createemptyborder(5,5,5,5), borderfactory.createlineborder(color.black)); mycomponent.setborder(cb); 

Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -