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? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -