# Java Swing Interface Quirk

**URL:** <https://forum.kirupa.com/t/java-swing-interface-quirk/211792>\
**Category:** programming\
**Created:** [January 5, 2007, 4:23am UTC](https://forum.kirupa.com/t/java-swing-interface-quirk/211792 "2007-01-05T04:23:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yeldarb](https://avatars.discourse-cdn.com/v4/letter/y/51bf81/32.png) [@Yeldarb](https://forum.kirupa.com/u/Yeldarb)\
**Post date:** [January 5, 2007, 4:23am UTC](https://forum.kirupa.com/t/java-swing-interface-quirk/211792/1 "2007-01-05T04:23:07Z")

</div>

Ok, so I’m writing a program with a GUI for the first time… but I’m kind of a perfectionist so this is bugging me:

```auto

	Frame root = new JFrame();
	
	JPanel input_screen;
	JPanel wait_screen;
	JPanel result_screen;
	
	JTextArea input;
	JTextArea solution_box;
	JScrollPane scroll;

...

		input_screen = new JPanel();
		
		// Create the screen where they enter the puzzle
		Box box = Box.createVerticalBox();
		
		JLabel puzzleText = new JLabel("Puzzle:");
		box.add(puzzleText);
		
		input = new JTextArea(5, 5);
		box.add(input);
		
		JButton solve = new JButton("Solve");
		solve.setActionCommand("submit");
		box.add(solve);
		
		solve.addActionListener(this);
		
		input_screen.add(box);

```

The problem is that when I type in the JTextArea, the JLabel and JButton above and below it move with the text. How can I set them to be in fixed positions? I tried containing the JTextArea in its own JPanel… but it didn’t fix it.
