<commit_before>package dotsboxes.gui.newgame;

import java.awt.Container;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JSpinner;
import javax.swing.SpringLayout;

import dotsboxes.EventManager;
import dotsboxes.callbacks.EventCallback;
import dotsboxes.events.Event;
import dotsboxes.events.EventType;
import dotsboxes.events.GUI_NewGameRequest;

public class CreateNewGame extends JPanel implements EventCallback {
	
	JSpinner m_numLocalPlayers = new JSpinner();
	JSpinner m_numRemotePlayers = new JSpinner();
	
	JSpinner m_fieldWidth = new JSpinner();
	JSpinner m_fieldHeight = new JSpinner();
	
	public CreateNewGame(Container parent) {
		m_Parent = parent;
		
		SpringLayout layout = new SpringLayout();
		
		setLayout( layout );
		
		JLabel local_players_label = new JLabel("Local players: "); 
		
		add(local_players_label);
		add(m_numLocalPlayers);
		<commit_msg>add limits for CreateNewGame spinners<commit_after>package dotsboxes.gui.newgame;

import java.awt.Container;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JSpinner;
import javax.swing.SpinnerNumberModel;
import javax.swing.SpringLayout;

import dotsboxes.EventManager;
import dotsboxes.callbacks.EventCallback;
import dotsboxes.events.Event;
import dotsboxes.events.EventType;
import dotsboxes.events.GUI_NewGameRequest;

public class CreateNewGame extends JPanel implements EventCallback {
	
	JSpinner m_numLocalPlayers = new JSpinner( new SpinnerNumberModel(1, 1, 9, 1) );
	JSpinner m_numRemotePlayers = new JSpinner(new SpinnerNumberModel(0, 0, 9, 1) );
	
	JSpinner m_fieldWidth = new JSpinner( new SpinnerNumberModel(5, 1, 9, 1) );
	JSpinner m_fieldHeight = new JSpinner( new SpinnerNumberModel(5, 1, 9, 1) );
	
	public CreateNewGame(Container parent) {
		m_Parent = parent;
		
		SpringLayout layout = new SpringLayout();
		
		setLayout( layout );
		
		JLabel local_players_label = new JLabel("Local players: "); 
		
		add(local_players_label);
		add(m_numLocalPlayers);
		
{'fraction_non_alphanumeric': 0.0901268115942029, 'fraction_numerical': 0.007246376811594203, 'mean_word_length': 5.61377245508982, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '815249', 'n_tokens_mistral': 763, 'n_tokens_neox': 681, 'n_words': 163}