The invention relates to a junction box for solar panels, with which the heat produced in the protecting diodes, MOSFETs or other corresponding power semiconductors of a solar panel can be reliably dissipated. In the junction box, the electronic components are pressed against the housing (1) or into recesses (3) corresponding to the geometry of the components by means of pressure elements, and electrical isolation, preferably a thermally conductive silicone rubber, is provided between the housing (1) and the components.