Building with Windows
If you were to write this out in your block editor, it would look like this:
Fill with Dirt from (0, -1, 0) to (4, -1, 4)
> This creates a solid base so the water doesn't leak out.
Fill with Farmland from (0, 0, 0) to (4, 0, 4)
> This replaces the surface with soil ready for planting.
Set block Water at (2, 0, 2) > Placing water in the very center (2 blocks in from every side) keeps the 5x5 area hydrated.
Fill with Wheat (or Carrots/Potatoes) from (0, 1, 0) to (4, 1, 4) > This plants the seeds one block above the soil.