Set the size of JTextField fixed in a JPanel
问题 for school I am working on a Java GUI program to store some administrative data. Now I want to display eventdata from my DB (mysql) into a JPanel with use of a JTextField, my problem is I can't get the size of the JTextField fixed as it always takes up a lot of place (see picture) Picture: http://postimg.org/image/5pcklo5n1/ Here's my code, anyone some tips? (I am new to java): public void editEvent() { JFrame frEventEdit = new JFrame ("Event Edit Menu"); frEventEdit.setDefaultCloseOperation