로그인 화면에 프레임 만들기

    엔트리에서 만든 로그인 화면을 수정해 2개의 프레임으로 구성해 보겠습니다.

    from tkinter import *
    
    # ----- 프로그램 화면 부분 -----
    root = Tk()
    root.title('frame')
    root.geometry('400x200')
    frame_A = Frame(root, relief='groove', borderwidth=2)
    frame_A.grid(row=0, column=0)
    frame_B = Frame(root, relief='groove', borderwidth=2)
    frame_B.grid(row=1, column=0)
    
    id_lbl = Label(frame_A, text='아이디 ', width=10, height=2)
    id_lbl.grid(row=0, column=0)
    id_ent = Entry(frame_A, width=20)
    id_ent.grid(row=0, column=1)
    
    pw_lbl = Label(frame_B, text='비밀번호', width=10, height=2)
    pw_lbl.grid(row=0, column=0)
    pw_ent = Entry(frame_B, width=20)
    pw_ent.grid(row=0, column=1)
    
    root.mainloop()
    실행결과
    신간 소식 구독하기
    뉴스레터에 가입하시고 이메일로 신간 소식을 받아 보세요.