I am very new to scripting. My problem is that I want the panel to look like this:

My code so far looks like this:
import bpy
class plm(bpy.types.Panel):
bl_idname = "d"
bl_label = "whatever"
bl_space_type = "VIEW_3D"
bl_region_type = "UI"
bl_category = 'My 1st '
def draw(self, context):
layout = self.layout
row = layout.row()
row.label(text= "generate sphere based on xy positions")
row.operator("mesh.primitive_uv_sphere_add")
row = layout.row()
def register():
bpy.utils.register_class(plm)
def unregister():
bpy.utils.unregister_class(plm)
if __name__ == "__main__":
register()
I want when the user clicks the icon to browse and select the file and the when it presses the (in this case sphere) button to generate the meshes based on the positions from the file.
I already have code to generate cubes and other meshes.
def genc(i,s,x,y):
bpy.ops.mesh.primitive_plane_add(size=0.01, enter_editmode=False, align='WORLD', location=(x, y, 0), scale=(1,1,1))
bpy.context.object.scale = s
The only problem is the panel, the icon click.
Thanks.
mesh.primitive_uv_sphere_addin you draw function with the name of that class from its bl_idname. $\endgroup$