Code example for JScrollPane

Methods: repaintrevalidate

0
	 */ 
	public void addCommand(DeviceCommand command) {
		counter++;
		listData.add(""+counter+" "+command.toString());
		this.setListData(listData);
		commandScrollList.revalidate();
		commandScrollList.repaint();
 
		this.ensureIndexIsVisible(listData.size()-1);
	} 
 
	/* (non-Javadoc) 
	 * @see com.ebay.testdemultiplexer.device.commands.recorder.CommandRecorderListener#commandRecorderCleared() 
	 */ 
	public void commandRecorderCleared() { 
		counter = 0;
		listData.clear();
		this.setListData(listData);
		commandScrollList.revalidate();
		commandScrollList.repaint();
Experience pair programming with AI  Get Codota for Java