java - How can I keep a JFrame to specific width and height? -


i made 840 400 frame , added text field. default, java app shrinked size of text field. want fixed respective size.

i tried setresizable(false), setextendedstate(), setbounds() no avail.

try

 setpreferredsize(new dimension(840,400)); 

if named frame can do

 name.setpreferredsize(new dimension(840,400)); 

Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

java - How to create Table using Apache PDFBox -

mpi - Why is MPI_Bsend not returning error even when the buffer is insufficient to accommodate all the messages -