Better way for connecting to Arduino pins to a sensor than jumper cable Well I have an dht21 and arduino mega. Dht21 leads look like this

If I use jumper cable and soldering dht21 leads with jumper cable than plug-in my arduino's socket. it looks like this below image. It dont looks safe. If the device falls to the ground or something, the cables may come out of place or the place may loosen over time. If I solder the cables under the arduino, it will be hard and looks like ugly. What is the best solution to plug-in a sensor to arduino board.
Remember the Arduino is a prototyping system and it should be easy to plug, unplug and move around connectors.
If you want a permanent solution, you should make your own PCB and you will have a huge choice of connectors suited for all imaginable purposes (for example the JST family of connectors).
There are some connectivity systems like the Grove connector that have attempted to standardize connectivity on Arduino and related platforms.