setSize(800, 300);
	MatrixWindow(Patch aPatch) {		super("Yamaha FS1R modulation matrix",true,true,true,true);		p = aPatch;		setSize(800, 300);                		Component oTableWidgets[][] = new Component[20][8];		MatrixCellRenderer oCellRender = new MatrixCellRenderer(p, oTableWidgets);		MatrixCellEditor oCellEditor = new MatrixCellEditor(oTableWidgets);		for (int i = 0; i < 8; i++) {			// destinations			ComboBoxWidget oDest = new ComboBoxWidget("", p, new YamahaFS1RPerformanceDriver.Model(p, 0x40+i), new YamahaFS1RPerformanceDriver.Sender(0x40+i), YamahaFS1RPerformanceEditor.mDestinations);			oDest.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));			oTableWidgets[14][i] = oDest;			// depth			//oTableWidgets[15][i] = new KnobWidget(null, p, 0, 0x7F, -64, new YamahaFS1RPerformanceDriver.Model(p, 0x48+i), new YamahaFS1RPerformanceDriver.Sender(0x48+i));						oTableWidgets[15][i] = new SpinnerWidget("",p , 0, 0x7F, -64, new YamahaFS1RPerformanceDriver.Model(p, 0x48+i), new YamahaFS1RPerformanceDriver.Sender(0x48+i));			// sources			for (int s = 0; s < 14; s++) {				if (s < 7) {					oTableWidgets[s][i] = new CheckBoxWidget("", p, new YamahaFS1RPerformanceDriver.BitModel(p, 0x30+i*2, 0, 1 << s, s), new YamahaFS1RPerformanceDriver.BitSender(p, 0x30+i*2));				}				else {					oTableWidgets[s][i] = new CheckBoxWidget("", p, new YamahaFS1RPerformanceDriver.BitModel(p, 0x31+i*2, 0, 1 << (s-7), s-7), new YamahaFS1RPerformanceDriver.BitSender(p, 0x31+i*2));				}			}			// part switches			for (int part = 0; part < 4; part++) {				oTableWidgets[15+part+1][i] = new CheckBoxWidget("", p, new YamahaFS1RPerformanceDriver.BitModel(p, 0x28+i, 0, 1 << part, part), new YamahaFS1RPerformanceDriver.BitSender(p, 0x28+i));			}					}		JTable oTable = new JTable(new MatrixTableModel(oTableWidgets));		TableColumn column = oTable.getColumnModel().getColumn(0);		column.setPreferredWidth(40);		for (int i = 1; i <= 20; i++) {			TableColumn oColumn = oTable.getColumnModel().getColumn(i);			if (i == 15) {				oColumn.setPreferredWidth(250);			} else if (i == 16) {				oColumn.setPreferredWidth(70);			}			else {				oColumn.setPreferredWidth(40); 			}			oColumn.setCellRenderer (oCellRender);			oColumn.setCellEditor(oCellEditor);		}		oTable.setIntercellSpacing(new Dimension(0,0));		oTable.setRowHeight(oTable.getRowHeight()+10);		oTable.setShowGrid(false);		oTable.setRowMargin(0);		oTable.setAlignmentX(Component.LEFT_ALIGNMENT);		JScrollPane oScrollPane = new JScrollPane(oTable);		//JPanel oMatrixPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));		//oMatrixPanel.add(oScrollPane);		//oScrollPane.setMaximumSize(new Dimension(600, 200));		oScrollPane.setBorder(new TitledBorder(LineBorder.createGrayLineBorder(),"Modulation matrix",TitledBorder.LEFT,TitledBorder.CENTER));		getContentPane().add(oScrollPane);	}