<commit_before>package pl.lodz.pl.ftims.supermarket.frontend.standalone.core;


import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.List;

import javax.swing.JFrame;

import backend.api.View;


public class MainFrame extends JFrame implements ActionListener {
	private static final long serialVersionUID = 1L;

	List<Initalizable> modules;
	LoginPrompt login;
	public MainFrame(List<Initalizable> modules){
		this.modules = modules;
		login = new LoginPrompt();

		this.login.loguj.addActionListener(this);
		this.login.anuluj.addActionListener(this);
	}
	
	public void startAfterLogin(){
		this.initializeWindow();
		this.createMenuBar();
		this.createMainJPanel();
		
		this.setVisible(true);
	}
	
	public boolean zaloguj(){
		System.out.println("Login : " + login.login.getText());
		System.out.println("Hasło : " + login.pass.getText());
		
		View view;
		view = new View();
		if(view.checkAuthorization(login.login.getText(), login.pass.getText()))
			System.out.println("UDalo sie zalogowac");
		
		//Probny user Maciejka
		//probny pass <PASSWORD>
			
		
	return true;				
	} 
	
	public void initializeWindow(){
		this.setTitle(Constants.program_title);
		//this.setAlwaysOnTop(true);
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		this.setExtendedState(JFrame.MAXIMIZED_BOTH);
	}

	public void createMenuBar(){
		this.setJMenuBar(new MenuBar().createMenuBar());
	}
<commit_msg>[FIX] Naprawiono logowanie<commit_after>package pl.lodz.pl.ftims.supermarket.frontend.standalone.core;


import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.List;

import javax.swing.JFrame;

import backend.api.View;


public class MainFrame extends JFrame implements ActionListener {
	private static final long serialVersionUID = 1L;

	List<Initalizable> modules;
	LoginPrompt login;
	public MainFrame(List<Initalizable> modules){
		this.modules = modules;
		login = new LoginPrompt();

		this.login.loguj.addActionListener(this);
		this.login.anuluj.addActionListener(this);
	}
	
	public void startAfterLogin(){
		this.initializeWindow();
		this.createMenuBar();
		this.createMainJPanel();
		
		this.setVisible(true);
	}
	
	public boolean zaloguj(){
		System.out.println("Login : " + login.login.getText());
		System.out.println("Hasło : " + login.pass.getText());
		
		View view;
		view = new View();
		if(view.checkAuthorization(login.login.getText(), login.pass.getText())){
			System.out.println("Udało się zalogowac");
			return true;
		}
		System.out.println("Nie udało się zalogować");
		//Probny user Maciejka
		//probny pass <PASSWORD>
	return false;				
	} 
	
	public void initializeWindow(){
		this.setTitle(Constants.program_title);
		//this.setAlwaysOnTop(true);
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		this.setExtendedState(JFrame.MAXIMIZED_BOTH);
	}

	public void createMenuBar(){
		this.setJMenuBar(new MenuBar().createMenuBar());
	}

{'fraction_non_alphanumeric': 0.1272108843537415, 'fraction_numerical': 0.0006802721088435374, 'mean_word_length': 4.7329434697855755, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5401739', 'n_tokens_mistral': 1068, 'n_tokens_neox': 957, 'n_words': 174}