Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
if(e.getKeyCode()==10){
void table_keyPressed (KeyEvent e)
{
if (e.getKeyCode ()==10)
{
//...
{
table.setColumnSelectionInterval (table.getSelectionColumn+1, table.getSelectionColumn+1);
protected boolean processKeyBinding(KeyStroke ks, KeyEvent e,int condition, boolean pressed) {
selRow = getSelectedRow();
selCol = getSelectedColumn();
if (ks == KeyStroke.getKeyStroke(KeyEvent.VK_ENTER,0)) {
if(getCellEditor()!=null)
getCellEditor().stopCellEditing();
this.getComponentAt((int)getCellRect(selRow,selCol,true).getX(),(int)getCellRect(selRow,selCol,true).getY()).transferFocus();
if(selCol==2){
if(selRow==getRowCount()-1){
( (TabellaLavoriFatturaClienteModel) getModel()).addRow(new Vector());
}
targetRow = selRow + 1;
targetCol = 0;
}else{
targetRow = selRow;
targetCol = selCol+1;
}
this.setRowSelectionInterval(targetRow,targetRow);
this.setColumnSelectionInterval(targetCol,targetCol);
SwingUtilities.invokeLater(new Runnable() {
public void run() {
getComponentAt((int)getCellRect(targetRow,targetCol,true).getX(),(int)getCellRect(targetRow,targetCol,true).getY()).requestFocus();
}
});
return true;
}
return super.processKeyBinding(ks,e,condition,pressed);
}