Java Code Examples for javax.swing.JPanel.setSize()

The following are Jave code examples for showing how to use setSize() of the javax.swing.JPanel class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: rapidminer   File: ChartConfigurationPanel.java   View Source Code Vote up 7 votes
@Override
public void print(Graphics pg) {

	JPanel printPanel = new JPanel() {

		private static final long serialVersionUID = 7315234075649335574L;

		@Override
		public void paintComponent(Graphics g) {
			Graphics2D g2 = (Graphics2D) g;
			plotEngine.getChartPanel().print(g2);
		}
	};
	Insets insets = plotEngine.getChartPanel().getInsets();
	int w = plotEngine.getChartPanel().getWidth() - insets.left - insets.right;
	int h = plotEngine.getChartPanel().getHeight() - insets.top - insets.bottom;
	printPanel.setSize(new Dimension(w, h));

	printPanel.print(pg);
}
 
Example 2
Project: openjdk-jdk10   File: CursorOverlappedPanelsTest.java   View Source Code Vote up 7 votes
private static JPanel createPanel(Point location, boolean enabled) {
    final JPanel panel = new JPanel();
    panel.setOpaque(false);
    panel.setEnabled(enabled);
    panel.setSize(new Dimension(200, 200));
    panel.setLocation(location);
    panel.setBorder(BorderFactory.createTitledBorder(
            enabled ? "Enabled" : "Disabled"));
    panel.setCursor(Cursor.getPredefinedCursor(
            enabled ? Cursor.CROSSHAIR_CURSOR : Cursor.DEFAULT_CURSOR));
    System.out.println("cursor: " + Cursor.getPredefinedCursor(enabled ? Cursor.CROSSHAIR_CURSOR : Cursor.DEFAULT_CURSOR));
    return panel;
}
 
Example 3
Project: ALTTPMenuPractice   File: TurnAnalyzer.java   View Source Code Vote up 6 votes
@SuppressWarnings("serial")
public TurnAnalyzer(JFrame frame) {
	super(frame,"Turn analysis");
	menuPainter = new JPanel() {
		public void paint(Graphics g) {
			if (refImg == null) {
				return;
			}
			Graphics2D g2 = (Graphics2D) g;
			g2.scale(2, 2);

			g2.drawImage(refImg, 0, 0, null);
		}
	};
	menuPainter.setPreferredSize(MENU_SIZE_X2);
	menuPainter.setMinimumSize(MENU_SIZE_X2);
	menuPainter.setSize(MENU_SIZE_X2);
	initialize();
}
 
Example 4
Project: jdk8u-jdk   File: CursorOverlappedPanelsTest.java   View Source Code Vote up 6 votes
private static JPanel createPanel(Point location, boolean enabled) {
    final JPanel panel = new JPanel();
    panel.setOpaque(false);
    panel.setEnabled(enabled);
    panel.setSize(new Dimension(200, 200));
    panel.setLocation(location);
    panel.setBorder(BorderFactory.createTitledBorder(
            enabled ? "Enabled" : "Disabled"));
    panel.setCursor(Cursor.getPredefinedCursor(
            enabled ? Cursor.CROSSHAIR_CURSOR : Cursor.DEFAULT_CURSOR));
    System.out.println("cursor: " + Cursor.getPredefinedCursor(enabled ? Cursor.CROSSHAIR_CURSOR : Cursor.DEFAULT_CURSOR));
    return panel;
}
 
Example 5
Project: SE2Project   File: AusleiheUI.java   View Source Code Vote up 6 votes
/**
 * Erzeugt den Ausleih-Button.
 */
private void erzeugeAusleihButton()
{
    JPanel _buttonPanel = new JPanel();
    _ausleihePanel.add(_buttonPanel, BorderLayout.SOUTH);
    _buttonPanel.setPreferredSize(new Dimension(-1, 110));
    _buttonPanel.setSize(-1, -1);
    _buttonPanel.setBackground(UIConstants.BACKGROUND_COLOR);

    _ausleihButton = new JButton();
    _buttonPanel.add(_ausleihButton);
    _ausleihButton.setText("ausleihen");
    _ausleihButton.setPreferredSize(new Dimension(140, 100));
    _ausleihButton.setSize(-1, -1);
    _ausleihButton.setFont(UIConstants.BUTTON_FONT);
    _ausleihButton.setEnabled(false);
}
 
Example 6
Project: SE2Project   File: VormerkUI.java   View Source Code Vote up 6 votes
/**
 * Erzeugt den Ausleih-Button.
 */
private void erzeugeAusleihButton()
{
    JPanel _buttonPanel = new JPanel();
    _ausleihePanel.add(_buttonPanel, BorderLayout.SOUTH);
    _buttonPanel.setPreferredSize(new Dimension(-1, 110));
    _buttonPanel.setSize(-1, -1);
    _buttonPanel.setBackground(UIConstants.BACKGROUND_COLOR);

    _vormerkenButton = new JButton();
    _buttonPanel.add(_vormerkenButton);
    _vormerkenButton.setText("vormerken");
    _vormerkenButton.setPreferredSize(new Dimension(140, 100));
    _vormerkenButton.setSize(-1, -1);
    _vormerkenButton.setFont(UIConstants.BUTTON_FONT);
    _vormerkenButton.setEnabled(false);
}
 
Example 7
Project: SE2Project   File: RueckgabeUI.java   View Source Code Vote up 6 votes
/**
 * Erzeuge das Tabellen-Panel, in dem die Verleihkarten angezeigt werden.
 */
private void erzeugeVerleihkartenauflister()
{
    JPanel verleihkartenAuflisterPanel = new JPanel();
    _hauptPanel.add(verleihkartenAuflisterPanel, BorderLayout.CENTER);
    verleihkartenAuflisterPanel.setLayout(new BorderLayout());
    verleihkartenAuflisterPanel
        .setPreferredSize(new java.awt.Dimension(-1, -1));
    verleihkartenAuflisterPanel.setSize(-1, -1);
    verleihkartenAuflisterPanel.setBackground(UIConstants.BACKGROUND_COLOR);

    JScrollPane verleihkartenAuflisterScrollPane = new JScrollPane();
    verleihkartenAuflisterPanel.add(verleihkartenAuflisterScrollPane,
            BorderLayout.CENTER);
    verleihkartenAuflisterScrollPane
        .setPreferredSize(new java.awt.Dimension(-1, -1));
    verleihkartenAuflisterScrollPane.setSize(-1, -1);
    verleihkartenAuflisterScrollPane.setBorder(BorderFactory
        .createTitledBorder(null, "Verleihkarten", TitledBorder.LEADING,
                TitledBorder.DEFAULT_POSITION, UIConstants.HEADER_FONT));
    verleihkartenAuflisterScrollPane
        .setBackground(UIConstants.BACKGROUND_COLOR);
    verleihkartenAuflisterScrollPane.getVerticalScrollBar()
        .setBackground(UIConstants.BACKGROUND_COLOR);
    verleihkartenAuflisterScrollPane.getHorizontalScrollBar()
        .setBackground(UIConstants.BACKGROUND_COLOR);

    _verleihkartenAuflisterTableModel = new VerleihkartenTableModel();
    _verleihkartenAuflisterTable = new JTable();
    verleihkartenAuflisterScrollPane
        .setViewportView(_verleihkartenAuflisterTable);
    _verleihkartenAuflisterTable
        .setModel(_verleihkartenAuflisterTableModel);
    JTableHeader tableHeader = _verleihkartenAuflisterTable
        .getTableHeader();
    tableHeader.setFont(UIConstants.HEADER_FONT);
    tableHeader.setReorderingAllowed(false);
    tableHeader.setResizingAllowed(false);
    _verleihkartenAuflisterTable.setFont(UIConstants.TEXT_FONT);
}
 
Example 8
Project: SE2Project   File: RueckgabeUI.java   View Source Code Vote up 6 votes
/**
 * Erzeuge den Rücknahme-Button.
 */
private void erzeugeRuecknahmeButton()
{
    JPanel buttonPanel = new JPanel();
    _ruecknahmePanel.add(buttonPanel, BorderLayout.SOUTH);
    buttonPanel.setPreferredSize(new java.awt.Dimension(-1, 110));
    buttonPanel.setSize(-1, -1);
    buttonPanel.setBackground(UIConstants.BACKGROUND_COLOR);

    _ruecknahmeButton = new JButton();
    buttonPanel.add(_ruecknahmeButton);
    _ruecknahmeButton.setText("zurücknehmen");
    _ruecknahmeButton.setPreferredSize(new java.awt.Dimension(140, 100));
    _ruecknahmeButton.setSize(-1, -1);
    _ruecknahmeButton.setEnabled(false);
    _ruecknahmeButton.setFont(UIConstants.BUTTON_FONT);
}
 
Example 9
Project: ArJ-class-editor   File: ArJClassEditor.java   View Source Code Vote up 5 votes
/**
 * Constructs an IDE editor panel, whose code is set with a parameter, with which the user can edit the file's code
 * @param initialCode the code that the the file is set to and shows up initially on the editor pane
 * @param d the dimension of the editor panel
 * @return the IDE editor panel
 * @throws IOException if file fails to save, rendering the initial compilation a failure
 * @throws MalformedURLException if the class fails to load into the ArJClassEditor (leaving it unable to run the compiled class)
 */
public JPanel createIDEEditorPanel(String initialCode, Dimension d) throws MalformedURLException, IOException
{
	JScrollPane editorScrollPane = createEditorScrollPane(initialCode);
	editorScrollPane.setPreferredSize(new Dimension((int) d.getWidth(), (int) (2/3 * d.getHeight())));
	consolePane.getViewport().setPreferredSize(new Dimension((int) d.getWidth(), (int) (1/3 * d.getHeight())));
	JPanel editorPanel = new JPanel();
	editorPanel.setLayout(new BoxLayout(editorPanel, BoxLayout.PAGE_AXIS));
	editorPanel.setSize(d);
	editorPanel.add(editorScrollPane);
	editorPanel.add(consolePane);
	compile();
	return editorPanel;
}
 
Example 10
Project: ArJ-class-editor   File: ArJClassEditor.java   View Source Code Vote up 5 votes
/**
 * Constructs an IDE editor panel, preset with the file's code, with which the user can edit the file's code
 * @param d the dimension of the editor panel
 * @return the IDE editor panel
 * @throws IOException if file fails to save, rendering the initial compilation a failure
 * @throws MalformedURLException if the class fails to load into the ArJClassEditor (leaving it unable to run the compiled class)
 */
public JPanel createIDEEditorPanel(Dimension d) throws MalformedURLException, IOException
{
	JScrollPane editorScrollPane = createEditorScrollPane(readFile());
	editorScrollPane.setPreferredSize(new Dimension((int) d.getWidth(), (int) (2/3 * d.getHeight())));
	consolePane.getViewport().setPreferredSize(new Dimension((int) d.getWidth(), (int) (1/3 * d.getHeight())));
	JPanel editorPanel = new JPanel();
	editorPanel.setLayout(new BoxLayout(editorPanel, BoxLayout.PAGE_AXIS));
	editorPanel.setSize(d);
	editorPanel.add(editorScrollPane);
	editorPanel.add(consolePane);
	compile();
	return editorPanel;
}
 
Example 11
Project: ABM-adaptive-tolerance   File: MigFrame.java   View Source Code Vote up 5 votes
public MigFrame(World world, EventManager event, int[] rules)
{
	super("MigScape 3.0");	// creates frame, the constructor uses a string argument for the frame title
	JPanel mainPanel = new JPanel(new GridLayout(5, 5));
	grid = new Grid(world, false);
	gridF = new Grid(world, true);
	ui = new UserControls(grid, event, rules);
	para = new Parameters(event, rules);

	mainPanel.add(grid, BorderLayout.CENTER);
	mainPanel.add(ui, BorderLayout.NORTH);
	mainPanel.add(para, BorderLayout.SOUTH);
	mainPanel.setSize(world.getSizeX()*10, world.getSizeY()*10);
	grid.setSize(new Dimension(world.getSizeX()*10, world.getSizeY()*10));
	gridF.setSize(new Dimension(world.getSizeX()*10, world.getSizeY()*10));
	ui.setSize(new Dimension(world.getSizeY()*10, 50));
	para.setSize(new Dimension(world.getSizeY()*10, 50));
	this.add(grid, BorderLayout.CENTER);
	this.add(gridF, BorderLayout.EAST);
	this.add(ui, BorderLayout.NORTH);
	this.add(para, BorderLayout.SOUTH);
	this.validate();
	setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);  // specifies what happens when user closes the frame. exit_on_close means the program will stop
	grid.setBackground(Color.WHITE);
	gridF.setBackground(Color.WHITE);
	ui.setBackground(Color.WHITE);
	para.setBackground(Color.WHITE);
}
 
Example 12
Project: paillier   File: GUI.java   View Source Code Vote up 5 votes
public Controls() {
	setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
	setBorder(new EmptyBorder(1, 1, 1, 1));
	setBackground(Color.blue);

	JPanel t = new JPanel();
	t.setBorder(new EmptyBorder(5, 5, 5, 5));
	label = new JLabel();
	label.setLayout(new BorderLayout());
	t.add(label);
	t.setSize(1185, 50);
	add(t);
	JPanel p = new JPanel();
	start = new JButton("Start");
	start.addActionListener(this);
	p.add(start);
	processVoting = new JButton("ProcessVoting");
	processVoting.addActionListener(this);
	p.add(processVoting);
	add(p);

	textArea = new JPanel();
	screen = new JTextArea(17, 100);
	screen.setLineWrap(true);
	screen.setForeground(Color.blue);// set color for font
	screen.setBackground(Color.WHITE);// set background color
	// screen.setText("\n" + "Results from encryption and decryption");
	JScrollPane scrollingArea = new JScrollPane(screen);
	scrollingArea.setSize(15, 100);
	textArea.add(scrollingArea, BorderLayout.CENTER);
	add(textArea);

}
 
Example 13
Project: openjdk-jdk10   File: ThemeReaderCrashTest.java   View Source Code Vote up 5 votes
ThemeReaderCrashTest() {
    JPanel panel = new JPanel();
    JScrollPane pane =
        new JScrollPane(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
                        ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
    panel.setSize(300, 200);

    panel.add(pane);
}
 
Example 14
Project: SE2Project   File: VormerkUI.java   View Source Code Vote up 5 votes
/**
 * Erzeugt das Ausleih-Panel, in dem die Zusammenfassung und der
 * Ausleih-Button angezeigt werden.
 */
private void erzeugeAusleihePanel()
{
    _ausleihePanel = new JPanel();
    BorderLayout ausleiheDetailsPanelLayout = new BorderLayout();
    _hauptPanel.add(_ausleihePanel, BorderLayout.EAST);
    _ausleihePanel.setLayout(ausleiheDetailsPanelLayout);
    _ausleihePanel.setPreferredSize(new Dimension(240, -1));
    _ausleihePanel.setSize(240, -1);
    _ausleihePanel.setBackground(UIConstants.BACKGROUND_COLOR);
    erzeugeAnzeigerPanel();
    erzeugeAusleihButton();
}
 
Example 15
Project: SE2Project   File: RueckgabeUI.java   View Source Code Vote up 5 votes
/**
 * Erzeugt das Hauptpanel, in dem sich Verleihkartenauflister,
 * Verleihkartenanzeiger und Rücknahme-Button befinden.
 */
private void erzeugeHauptPanel()
{
    _hauptPanel = new JPanel();
    _hauptPanel.setLayout(new BorderLayout());
    _hauptPanel.setPreferredSize(new java.awt.Dimension(-1, -1));
    _hauptPanel.setSize(-1, -1);
    _hauptPanel.setAutoscrolls(true);
    _hauptPanel.setBackground(UIConstants.BACKGROUND_COLOR);
}
 
Example 16
Project: SE2Project   File: RueckgabeUI.java   View Source Code Vote up 5 votes
/**
 * Erzeuge das Rücknahme-Panel, in dem der Verleihkartenanzeiger und der
 * Rüchnahme-Button liegen.
 */
private void erzeugeRuecknahme()
{
    _ruecknahmePanel = new JPanel();
    BorderLayout ausleiheDetailsPanelLayout = new BorderLayout();
    _hauptPanel.add(_ruecknahmePanel, BorderLayout.EAST);
    _ruecknahmePanel.setLayout(ausleiheDetailsPanelLayout);
    _ruecknahmePanel.setPreferredSize(new java.awt.Dimension(240, -1));
    _ruecknahmePanel.setSize(240, -1);
    _ruecknahmePanel.setBackground(UIConstants.BACKGROUND_COLOR);
    erzeugeVerleihkartenAnzeiger();
    erzeugeRuecknahmeButton();
}
 
Example 17
Project: chipKIT-importer   File: ProgressTrackingPanel.java   View Source Code Vote up 5 votes
private JComponent createImportFailedPane( Exception cause ) {
    JLabel infoLabel = new JLabel( NbBundle.getMessage( ProgressTrackingPanel.class, "ProgressTrackingPanel.importFailedMessage" ));
    infoLabel.setHorizontalAlignment(JLabel.CENTER );
    infoLabel.setBackground(Color.red);
    infoLabel.setOpaque(true);
    infoLabel.setBorder( BorderFactory.createLineBorder(Color.red, 3) );
    
    ByteArrayOutputStream arrayOutputStream = new ByteArrayOutputStream();
    PrintWriter printWriter = new PrintWriter( arrayOutputStream );
    cause.printStackTrace( printWriter );
    printWriter.flush();
    String stackTraceText = arrayOutputStream.toString();
    
    JTextArea stackTraceTextArea = new JTextArea( stackTraceText );
    stackTraceTextArea.setEditable(false);
    
    JScrollPane scrollPane = new JScrollPane( stackTraceTextArea );        
    
    JButton copyToClipboardButton = new JButton( NbBundle.getMessage( ProgressTrackingPanel.class, "ProgressTrackingPanel.copyToClipboard" ));
    copyToClipboardButton.addActionListener( (a) -> {
        Toolkit defaultToolkit = Toolkit.getDefaultToolkit();
        defaultToolkit.getSystemClipboard().setContents( new StringSelection(stackTraceText), null );
    });
    
    JPanel p1 = new JPanel( new FlowLayout(FlowLayout.TRAILING) );
    p1.add( copyToClipboardButton );
    
    JPanel p2 = new JPanel( new BorderLayout(0, 10) );
    p2.add( infoLabel, BorderLayout.NORTH );
    p2.add( scrollPane, BorderLayout.CENTER );        
    p2.add( p1, BorderLayout.SOUTH );
    p2.setSize( new Dimension(600,400) );
    p2.setMinimumSize( p2.getSize() );
    p2.setPreferredSize( p2.getSize() );
    
    return p2;
}
 
Example 18
Project: jmt   File: FittingPanel.java   View Source Code Vote up 4 votes
private void initComponents() {
	Box mainBox = Box.createVerticalBox();
	Box centralBox = Box.createHorizontalBox();
	// Pannello dei componenti univariate statistics panel
	JPanel componentsPanel = new JPanel(new BorderLayout(0, 5));

	setLayout(new GridLayout(1, 1));

	mainBox.add(Box.createVerticalStrut(10));
	mainBox.add(centralBox);
	mainBox.add(Box.createVerticalStrut(10));
	add(mainBox);

	// components univariate statistics panel
	if (distribution == EXPO) {
		componentsPanel.add(new JLabel("Results of fitting of exponential distribution"), BorderLayout.NORTH);
	} else {
		componentsPanel.add(new JLabel("Results of fitting of Pareto distribution"), BorderLayout.NORTH);
	}

	resultfittingScrollPane = new JScrollPane();
	resultfittingTextArea = new JTextArea();
	resultfittingTextArea.setColumns(20);
	resultfittingTextArea.setRows(5);
	resultfittingScrollPane.setViewportView(resultfittingTextArea);

	componentsPanel.add(resultfittingScrollPane, BorderLayout.CENTER);

	graphicspanel = new JPanel(new GridLayout(1,3));
	graphicspanel.setSize(new Dimension(200,100));

	panelqqplot = new JPanel(new BorderLayout());
	panelqqplot.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED), "QQ-plot"));

	panelcdf = new JPanel(new BorderLayout());
	panelcdf.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED), "CDF"));

	panelpdf = new JPanel(new BorderLayout());
	panelpdf.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED), "pdf"));

	qqplot = new SmallQQPlot(model,engfitting);
	qqplot.setDistribution(distribution); 
	cdfplot = new SmallCDF(model, engfitting);
	cdfplot.setDistribution(distribution);
	pdfplot = new SmallPDF(model, engfitting);
	//just to try
	panelqqplot.add(qqplot);
	panelcdf.add(cdfplot);
	panelpdf.add(pdfplot);

	graphicspanel.add(panelqqplot);
	graphicspanel.add(panelcdf);
	graphicspanel.add(panelpdf);
	graphicspanel.setPreferredSize(new Dimension(300,240));

	componentsPanel.add(graphicspanel, BorderLayout.SOUTH);
	centralBox.add(componentsPanel);
}
 
Example 19
Project: QN-ACTR-Release   File: FittingPanel.java   View Source Code Vote up 4 votes
private void initComponents() {
  	Box mainBox = Box.createVerticalBox();
Box centralBox = Box.createHorizontalBox();
// Pannello dei componenti univariate statistics panel
JPanel componentsPanel = new JPanel(new BorderLayout(0, 5));

setLayout(new GridLayout(1, 1));

mainBox.add(Box.createVerticalStrut(10));
mainBox.add(centralBox);
mainBox.add(Box.createVerticalStrut(10));
add(mainBox);

// Pannello dei componenti univariate statistics panel
if(distribution == EXPO)
	componentsPanel.add(new JLabel("Results of fitting of exponential distribution"), BorderLayout.NORTH);
else if(distribution == PARETO)
	componentsPanel.add(new JLabel("Results of fitting of Pareto distribution"), BorderLayout.NORTH);

      resultfittingScrollPane = new JScrollPane();
      resultfittingTextArea = new JTextArea();
      resultfittingTextArea.setColumns(20);
      resultfittingTextArea.setRows(5);
      resultfittingScrollPane.setViewportView(resultfittingTextArea);

      componentsPanel.add(resultfittingScrollPane, BorderLayout.CENTER);
      
      graphicspanel = new JPanel(new GridLayout(1,3));
      graphicspanel.setSize(new Dimension(200,100));
      
      panelqqplot = new JPanel(new BorderLayout());
      panelqqplot.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED), "QQ-plot"));
      
      panelcdf = new JPanel(new BorderLayout());
      panelcdf.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED), "CDF"));
      
      panelpdf = new JPanel(new BorderLayout());
      panelpdf.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED), "pdf"));

      qqplot = new SmallQQPlot(model,engfitting);
      qqplot.setDistribution(distribution); 
      cdfplot = new SmallCDF(model, engfitting);
      cdfplot.setDistribution(distribution);
      pdfplot = new SmallPDF(model, engfitting);
      //just to try
      panelqqplot.add(qqplot);
      panelcdf.add(cdfplot);
      panelpdf.add(pdfplot);

      graphicspanel.add(panelqqplot);
      graphicspanel.add(panelcdf);
      graphicspanel.add(panelpdf);
      graphicspanel.setPreferredSize(new Dimension(300,240));
      
      componentsPanel.add(graphicspanel, BorderLayout.SOUTH);
      centralBox.add(componentsPanel);
  }
 
Example 20
Project: PointOfSale   File: CheckoutFrame.java   View Source Code Vote up 4 votes
public void addNumpad(Panel panel, JTextField input)
	{
		JPanel numPnl = new JPanel(new GridLayout(4,3));
		JPanel zeroPnl = new JPanel(new BorderLayout());
		
		for(int i = 1; i < 13; i++){
			
			JButton numBtn = new JButton();


			if(i == 10){
				numBtn.setText(String.valueOf("0"));
				numBtn.addActionListener(e -> RetailHelper.addToTextField(input, numBtn.getText()));
			}
			else if (i == 11) {
				numBtn.setText(String.valueOf("."));
				numBtn.addActionListener(e -> RetailHelper.addToTextField(input, numBtn.getText()));
			}
			else if (i == 12) {
				numBtn.setText(String.valueOf("clr"));
				numBtn.addActionListener(e -> RetailHelper.setTextField(input, ""));
			}
			else {
				numBtn.setText(String.valueOf(i));
				numBtn.addActionListener(e -> RetailHelper.addToTextField(input, numBtn.getText()));				
			}
			numPnl.add(numBtn);
				
//				JButton zeroBtn = new JButton();
//				zeroBtn.setText("0");
//				zeroBtn.addActionListener(e -> input.setText(input.getText()+ "" + zeroBtn.getText()));
//				zeroPnl.add(zeroBtn, BorderLayout.CENTER);
//				barcodePnl.add(b, BorderLayout.SOUTH);
//			}
		}
		JPanel eastNumPnl = new JPanel();
		eastNumPnl.setLayout(new BoxLayout(eastNumPnl, BoxLayout.PAGE_AXIS));

		Dimension size = new Dimension(100, 100);
		zeroPnl.setPreferredSize(size);
		zeroPnl.setSize(size);
		zeroPnl.setMaximumSize(size);

		
		panel.add(numPnl, BorderLayout.SOUTH);
		//panel.add(zeroPnl, BorderLayout.SOUTH);
	}