Added some migrations and Simple GUI

This commit is contained in:
maciejrusek
2026-04-26 16:18:14 +02:00
parent c1af31f41d
commit e5c5670ac5
16 changed files with 283 additions and 29 deletions

View File

@@ -0,0 +1,36 @@
package ui;
import javax.swing.*;
import java.awt.*;
public class MyFrame extends JFrame {
JPanel mainPanel = new JPanel(new CardLayout());
public void changePanel(String panel) {
}
public MyFrame() {
super("Todo App");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setSize(800, 600);
setLocation(50, 50);
setLayout(new CardLayout());
JPanel startPanel = new JPanel();
JButton loginButton = new JButton("Login");
startPanel.add(loginButton);
mainPanel.add(startPanel, "start");
mainPanel.add(LoginPanel.getLoginPanel(), "login");
loginButton.addActionListener(e -> {
CardLayout cl = (CardLayout)mainPanel.getLayout();
cl.show(mainPanel, "login");
});
add(mainPanel);
setVisible(true);
}
}