Below you can see the front-view size comparison of the Nikon L840 and Panasonic GX7. The Panasonic GX7 is 18 mm shorter and 41 mm thinner than the Nikon L840 but it is also 9 mm wider.
The chart below depicts how two cameras compare with average dimensions of the cameras in their class.