会员可以在此提问,百战程序员老师有问必答
对大家有帮助的问答会被标记为“推荐”
看完课程过来浏览一下别人提的问题,会帮你学得更全面
截止目前,同学们一共提了 132443个问题
JAVA 全系列/第三阶段:数据库编程/JDBC技术(旧) 19891楼
JAVA 全系列/第三阶段:数据库编程/JDBC技术(旧) 19892楼
JAVA 全系列/第一阶段:JAVA 快速入门/IDEA的使用和第一个java项目 19893楼
Python 全系列/第十二阶段:Python_Django3框架/Django初级 19894楼

springbootmybatis1.rar

老师帮忙看看,控制台报

org.thymeleaf.exceptions.TemplateInputException: Error resolving template [addUser], template might not exist or might not be accessible by any of the configured Template Resolvers

页面

image.png

JAVA 全系列/第九阶段:Spring Boot实战/Spring Boot 19897楼

vue-egoshop.zip

老师,我出不来老师这样的样式了,我就是写上子结构的时候,就出不来了

image.png

错误:

image.png

WEB前端全系列/第二十阶段:Vue2企业级项目(旧)/Ego商城高级Vue实战项目 19898楼
JAVA 全系列/第一阶段:JAVA 快速入门/面向对象详解和JVM底层内存分析 19899楼

image.png

"""计算器软件界面的设计"""
from tkinter import *  # 定义了图像用户界面GUI模块
from tkinter import messagebox


class Application(Frame):  # 定义一个应用类(Application)它的父类是一个容器(Frame)
    """一个经典的GUI程序的类的写法"""

    def __init__(self, master=None):  # 构造器用来构造属性
        super().__init__(master)  # Frame不会自动调用父类所以需要super(),super()代表的是父类的定义,而不是父类对象
        self.master = master
        self.pack()
        self.createWidget()

    def createWidget(self):
        """通过grid布局实现计算器的界面设计"""
        btnText=(("MC","M+","M-","MR"),
                 ("C","±","/","*"),
                 (7,8,9,"-"),
                 (4,5,6,"+"),
                 (1,2,3,"="),
                 (0,"."))

        Entry(self).grid(row=0, column=0, columnspan=4, pady=10)

        for rindex,r in enumerate(btnText):
            for cindex,c in enumerate(r):
                if c == "=":
                    Button(self, text=c, width=6).grid(row=rindex + 1, column=cindex, rowspan=2, sticky=NSEW)
                elif c == 0:
                    Button(self, text=c, width=6).grid(row=rindex + 1, column=cindex, columnspan=2, sticky=NSEW)
                elif c == ".":
                    Button(self, text=c, width=6).grid(row=rindex + 1, column=cindex+1, sticky=NSEW)
                else:
                    Button(self, text=c, width=6).grid(row=rindex+1, column=cindex, sticky=NSEW)


if __name__=="__main__":
    root = Tk()  # 启动窗口
    root.geometry("230x230+300+300")  # 设置窗口的大小
    root.title("计算器")  # 窗口名
    app = Application(master=root)
    root.mainloop()

老师怎么把白色框给占满?这和按钮不对称,看着不得劲

Python 全系列/第二阶段:Python 深入与提高/GUI编程(隐藏) 19901楼
Python 全系列/下架-第十二阶段:Python_大型电商项目(5天后下架)/Django项目阶段-电商项目(旧) 19903楼
微服务/第一阶段:SSM 框架和项目开发/(旧)Mybatis 19904楼
微服务/第一阶段:SSM 框架和项目开发/(旧)Mybatis 19905楼

课程分类

百战程序员微信公众号

百战程序员微信小程序

©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园
网站维护:百战汇智(北京)科技有限公司
京公网安备 11011402011233号    京ICP备18060230号-3    营业执照    经营许可证:京B2-20212637