Code example for JLabel

Methods: setLabelFor

0
				JMeterUtils.getResString("thread_properties"))); // $NON-NLS-1$ 
 
		// NUMBER OF THREADS 
		JPanel threadPanel = new JPanel(new BorderLayout(5, 0));
 
		JLabel threadLabel = new JLabel(JMeterUtils.getResString("number_of_threads")); // $NON-NLS-1$
		threadPanel.add(threadLabel, BorderLayout.WEST);
 
		threadInput = new JTextField(5);
		threadInput.setName(THREAD_NAME);
		threadLabel.setLabelFor(threadInput);
		threadPanel.add(threadInput, BorderLayout.CENTER);
 
		threadPropsPanel.add(threadPanel);
 
		// RAMP-UP 
		JPanel rampPanel = new JPanel(new BorderLayout(5, 0));
		JLabel rampLabel = new JLabel(JMeterUtils.getResString("ramp_up")); // $NON-NLS-1$
		rampPanel.add(rampLabel, BorderLayout.WEST);
 
Experience pair programming with AI  Get Codota for Java