imgLabel.place(x=-252, y=-200, relx=0.5, rely=0.5, relwidth=1, relheigh=0.5)
# 设置文本标签和位置
Label(login_frame..."发送", bg="#00BFFF",
fg="white", width=13, height=2, font=('黑体', 12),)
button1.place(x=650, y=640)
# 设置关闭窗口按钮及位置...self.b1.place(x=207, y=480)
self.b2.place(x=255, y=480)
self.b3.place(x=303, y=480)
self.b4.place(x=...# 把头像转化为PhotoImage
self.face.append(PhotoImage(file='用户头像1.png')) # 把头像图片加入到列表中
self.message_text.image_create...,而是单独调用被封装的发送消息和接受消息实例方法,好处就是是可以实现可重用代码,不用再每一个请求中都重复输入这代码,这样我们再每一个处理实例中只需输入一句调用语句即可
注意:上面代码是给客户端main