Tab Key Navigation in JTable

Hello All,
Can anyone please help me with Tab key navigation in a JTable.I
read all the messages in this group but couldn't implement one.It
would be a great help if anyone can provide me a working example of how
to control the tab key in the JTable. I have a JTable with some of the
columns not editable, I want the focus to be in the first cell and
whenever the TAB key is pressed, the focus should go to next editable
cell and select the data in it.For example: if you take a simple table of 4 columns with column 2 not editable, The focus should begin with the first cell(1st column,1st row) and goto (3rd column,1st row) whenever TAB is pressed.It should work in reverse when SHIFT-TAB is pressed.
I'm new to Java Swing.I would greatly appreciate if anyone can provide me a working example.
Thanks in advance,
siddu.

OK Here is what I have ...
public class MultipleEditorsPerColumnJTable extends JTable {
/** Creates a new instance of MultipleEditorsPerColumnJTable */
public MultipleEditorsPerColumnJTable( int the_column) {
this.myColumn = the_column;
this.rowEditors = new ArrayList();
setFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, Collections.EMPTY_SET);
setFocusTraversalKeys(KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, Collections.EMPTY_SET);
protected boolean processKeyBinding(KeyStroke ks, KeyEvent e,int condition, boolean pressed) {
boolean isSelected = false;
if (ks == KeyStroke.getKeyStroke(KeyEvent.VK_TAB,0)) {
int selRow = getSelectedRow();
int rowCount = getRowCount();
int selCol = getSelectedColumn();
if (selCol == 1) { isSelected= getCellEditor(selRow,selCol).stopCellEditing();}
int targetRow = (selRow + 1) % rowCount;
this.editCellAt(targetRow, 1);
this.getComponentAt(targetRow, 1).requestFocus();
return super.processKeyBinding(ks,e,condition,pressed);
I think I know why the requestFocus() is not working. OK, I have a MultipleEditorsPerColumnJTable (sub of JTale), JTextPane, JButton and JLabel. The textpane, label and button have individual editors and renderers. Each time I want to display a new Row, I re-render these components and add it to the table.
Now with the above code, it still navigates to the next component in the row/ first column in next row depending on the current column. What am I doing wrong?
Thanks,
Praveen.

Similar Messages

  • Regarding Tab key Navigation in a page

    Hi,
    I have a requirement regarding the tab key navigation on a page.
    Suppose the focus is on the last field of a page, on clicking the tab key i should go to the first field in the page not the url. i tried using tab index, but the problem is that after coming back to the first field from the last field, on clicking on tab again it does not go on as usual, it suddenly jumps to the url from there.
    Regards
    Krishna

    OK Here is what I have ...
    public class MultipleEditorsPerColumnJTable extends JTable {
    /** Creates a new instance of MultipleEditorsPerColumnJTable */
    public MultipleEditorsPerColumnJTable( int the_column) {
    this.myColumn = the_column;
    this.rowEditors = new ArrayList();
    setFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, Collections.EMPTY_SET);
    setFocusTraversalKeys(KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS, Collections.EMPTY_SET);
    protected boolean processKeyBinding(KeyStroke ks, KeyEvent e,int condition, boolean pressed) {
    boolean isSelected = false;
    if (ks == KeyStroke.getKeyStroke(KeyEvent.VK_TAB,0)) {
    int selRow = getSelectedRow();
    int rowCount = getRowCount();
    int selCol = getSelectedColumn();
    if (selCol == 1) { isSelected= getCellEditor(selRow,selCol).stopCellEditing();}
    int targetRow = (selRow + 1) % rowCount;
    this.editCellAt(targetRow, 1);
    this.getComponentAt(targetRow, 1).requestFocus();
    return super.processKeyBinding(ks,e,condition,pressed);
    I think I know why the requestFocus() is not working. OK, I have a MultipleEditorsPerColumnJTable (sub of JTale), JTextPane, JButton and JLabel. The textpane, label and button have individual editors and renderers. Each time I want to display a new Row, I re-render these components and add it to the table.
    Now with the above code, it still navigates to the next component in the row/ first column in next row depending on the current column. What am I doing wrong?
    Thanks,
    Praveen.

  • Enter key as Tab Key in a JTable

    How can I have the Enter Key act as a Tab Key in a JTable?

    thnx...but I already solved my problem. In case someone has the same problem:
    final InputMap im = table.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
    final KeyStroke key = KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0, false);
    im.put(key, "selectNextColumnCell");

  • IECanvas browser + Tab key navigation

    When I embed IE into IECanvas bowser, does it support TAB key navigation?
    If not, How to achieve the same?

    See
    http://www.yourhtmlsource.com/forms/formsaccessibility.html
    Assign the tabindex attribute on the elements you want according to your desired navigation sequence.

  • JTable tab key navigation with JComboBox Cell Editors in Java 1.3 & 1.4

    Hello - this is one for the experts!
    I have a JTable which has an editable JComboBox as one of the cell editors for a particular column. Users must be able to navigate through the table using the tab key. After editing a cell a single tab should advance the cell selection to the next column and then the user should just be able to start typing to populate the cell.
    However, i've come across some really frustrating differences between the Swing implementation of JDK1.3.1_09 and JDK 1.4.2_04 which means this behaviour is very different between versions!....
    1. Editing Cells and then advancing to the next column using tab.
    Using standard cell editors (based around JTextFields) in 1.3.1 the user has to press tab twice to traverse to the next column after editing. However, in 1.4.2 a single tab key is enough to move to the next column after editing.
    2. Editable JComboBox editors and and advancing to the next column using tab.
    Using JDK 1.3.1, having entered some text in the editable combo it takes 2 tabs to transfer the selected cell to the next column. With 1.4.2 a single tab while editing the editable combo ends editing and transfers the selection out of the table completely?!?
    With these 2 issues I don't know how to make a single tab key reliably transfer to the next cell, between java versions. Can anyone please help me?!??!
    (i've attached test code below which can be run in both 1.3 and 1.4 and demonstrates the above behaviour.)
    package com.test;
    import java.awt.*;
    import javax.swing.table.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class TableTest4 extends JFrame {
         private JTable table;
         private DefaultTableModel tableModel;
         public TableTest4() {
              initFrame();
          * Initialises the test frame.
         public void initFrame() {
              // initialise table
              table = new JTable(10, 5);
              tableModel = (DefaultTableModel) table.getModel();
              table.setPreferredScrollableViewportSize(table.getPreferredSize());
              table.setRowHeight(22);
              JScrollPane scrollPane = new JScrollPane(table);
              getContentPane().add(scrollPane);
              JButton dummyBtn1 = new JButton("Dummy Button 1");
              JButton dummyBtn2 = new JButton("Dummy Button 2");
              // initialise frame
              JPanel btnPanel = new JPanel(new GridLayout(2, 1));
              btnPanel.add(dummyBtn1);
              btnPanel.add(dummyBtn2);
              getContentPane().add(btnPanel, BorderLayout.SOUTH);
              // set renderer of first table column to be an editable combobox
              JComboBox editableCombo = new JComboBox();
              editableCombo.setEditable(true);
              TableColumn firstColumn = table.getColumnModel().getColumn(0);
              firstColumn.setCellEditor(new DefaultCellEditor(editableCombo));
         public static void main(String[] args) {
              TableTest4 frame = new TableTest4();
              frame.setDefaultCloseOperation(EXIT_ON_CLOSE);
              frame.pack();
              frame.setVisible(true);

    Run the above code in 1.3 and 1.4 and you can see that after editing a cell, the tab key behaviour works differently between versions.
    I don't believe by adding a key listener to the cell editors will have the desired effect.
    I've read other posts and from what i've read it looks like the processKeyBinding method of the JTable can be overridden to manually handle key events.
    Has anyone done this to handle tab key presses so that the same java app running under 1.3 and 1.4 works in the same way ??? I would really appreciate some advice on this as its very frustrating !

  • Problem with tab-key navigation

    I am making chanegs to an existing form.
    I have a tab canvas with 3 tabs, each contains a data block, and other data blocks outside of the tab canvas.
    I wanted the tab key to move the cursor to the next record so I changed the navigation style from "Change Block" to "Change Record", but it did not help. When the cursor is a on a record of a multi-record block and I tab through the items to the last one, pressing the tab key leads me to another tab-page.
    I put in some debug code and noticed that the WHEN-TAB-CHANGED trigger did not fire. The WHEN-VALIDATE-RECORD trigger fired and the cursor block and record number were correct.
    After the tab key took me to another tab-page and I navigated back to the original tab-page. Even though it looks like I'm on the correct tab page, SYSTEM.cursor_block was NOT correct, it was pointing to another data block outside of the tab canvas.
    I checked other forms on our system and I'm pretty sure that changing the navigation style to "Change Record" would work. Perhaps there's something peculiar about this form.
    Any idea will be appreciated.
    Thanks.

    Found the problem.
    For some reason, the WHEN-NEXT-ITEM trigger of the last item of the record is hard-coded to go the another block.

  • Key navigation for JTable

    I have a JTable and i need to select its rows during key navigation.
    Say i have 23 columns in this table and just for test purposes everytime on keypressed i want to select 2nd row. I am doing it in following way within KeyPressed Event.
    int[] indexes = table.getSelectedRows();
    table.requestFocus();
    int[] cols = table.getSelectedColumns();
    for (int xx=0; xx<cols.length; xx++ )
    table.removeColumnSelectionInterval(cols[xx],cols[xx]);
    table.removeRowSelectionInterval(indexes[0],indexes[0]);
    table.setColumnSelectionInterval(0,22);
    table.setRowSelectionInterval(2,2);
    But this doesn't seem to work on keypressed event although it works fine if i call it from some other place like a button pressed. Any help gurus ???
    TIA

    Sorry i missed to mention what it actually seems to do. It only selected the 1st column when this piece of code is called from KeyPressed Event.
    But when the same code is called from any other place it selects all the 23 columns.
    I will appreciate any help on this bottleneck problem for me.

  • How to detect key navigation in JTable

    Hi,
    I have a problem with JTable's events. When the user presses the mouse's left button on a cell, a mouseClicked event is generated, and my program works fine. But when the user moves from cell to cell with the cursor keys or the tab key, no mouseClicked event is generated, and my event code doesn't execute. I have seen listeners like TableColumnModelListener, but I don't want two or more events at the same time: i.e. if I go from cell 1,1 to cell 2,2, I just want one event, not one for the column and another for the row. I just want ONE event for "selection change", originated by mouse or keyboard. What should I use?
    I'm using Java 1.4.
    Thanks.

    [url http://java.sun.com/docs/books/tutorial/uiswing/misc/keybinding.html]How to use Key Bindings

  • PJC tab-key navigation problem within bean  (FORMS intercepting tab key??)

    Using Forms 10.1.2.3, IE7, JRE 1.6
    When attempting to navigate within the bean area, it appears as if FORMS is suppressing the keyEvent when the tab key is pressed. This means that I cannot use tab or shift-tab to navigate within the PJC's editable fields/buttons. I can click on them, enter data within them, but tab is somehow intercepted. When I place my PJC within a normal (non-forms) Java window, everything works fine.
    Documentation that I've read seems to indicate that tab should navigate perfectly fine within the bean area.
    Any ideas?

    Hi,
    This is how I did it. Sorry about the formatting, it was OK when I pasted the code fragment in.
    My class contains this in the variable definitions.
    private AWTEventListener keyListener = new DoKey ();
    private class DoKey implements AWTEventListener {
    public void eventDispatched (AWTEvent e) {
    //System.err.println("eventDispatched " + e.toString());
    //System.err.println("eventDispatched source " + e.getSource().toString());
    if ((e instanceof KeyEvent) && (e.getSource() instanceof Component)) {
    * The event was a key pressed event and it was sourced from a Component.
    KeyEvent evt = (KeyEvent) e;
    if (evt.getID() == evt.KEY_PRESSED) {
    if (evt.getKeyCode() == evt.VK_TAB) {
    if (evt.isShiftDown()) {
    ((Component)e.getSource()).transferFocusBackward();
    else {
    ((Component)e.getSource()).transferFocus();
    The listener is enabled when on initialisation
    Toolkit.getDefaultToolkit().addAWTEventListener (keyListener, AWTEvent.KEY_EVENT_MASK);
    Regards, Tony C

  • TAB key Navigation distance.....

    I want to control the space alloted in a JTextPane when pressing TAB key.
    More precisly I need to define the tab length when I press the TAB key.
    Any help is appriciated !
    Thanks

    Here is a working example that sets each of the first 10 tabs to represent 4 characters (the default is 8). This is applied to the entire document. Hope this helps.
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.text.*;
    public class TestTextPane extends JFrame
         public TestTextPane()
              JPanel panel = new JPanel();
              setContentPane( panel );
              JTextPane textPane = new JTextPane();
              textPane.setFont( new Font("monospaced", Font.PLAIN, 12) );
              textPane.setText( "abcdefghijklmnop\n\tone\n\t\ttwo" );
              JScrollPane scrollPane = new JScrollPane( textPane );
              scrollPane.setPreferredSize( new Dimension( 200, 200 ) );
              panel.add( scrollPane );
              setTabs( textPane, 4 );
         public void setTabs( JTextPane textPane, int charactersPerTab)
              FontMetrics fm = textPane.getFontMetrics( textPane.getFont() );
              int charWidth = fm.charWidth( 'w' );
              int tabWidth = charWidth * charactersPerTab;
              TabStop[] tabs = new TabStop[10];
              for (int j = 0; j < tabs.length; j++)
                   int tab = j + 1;
                   tabs[j] = new TabStop( tab * tabWidth );
              TabSet tabSet = new TabSet(tabs);
              SimpleAttributeSet attributes = new SimpleAttributeSet();
              StyleConstants.setTabSet(attributes, tabSet);
              textPane.getStyledDocument().setParagraphAttributes(0, textPane.getDocument().getLength(), attributes, true);
         public static void main(String[] args)
              TestTextPane frame = new TestTextPane();
              frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
              frame.pack();
              frame.setVisible(true);

  • Tab and back-tab out of a JTable

    Hi There,
    I have been working for some time on improving the default behaviour of the tab key within editable JTables. It largely works as required now, but I'm stuck on getting back-tab to leave the table if on row 0, col 0. I register tab and back-tab action in the table's ActionMap that looks like this:     
         class TabAction extends AbstractAction {
              public void actionPerformed(ActionEvent e) {
                   if (getRowCount() > 0) {
                        int row = getSelectedRow();
                        int column = getSelectedColumn();
                        if (row < 0 || column < 0) {
                             row = 0;
                             column = 0;
                        do {
                             if (++column >= getColumnCount()) {
                                  row++;
                                  column = 0;
                        } while (row < getRowCount() && ! isCellTabbable(row, column));
                        if (row < getRowCount()) {
                             changeSelection(row, column, false, false);
                        } else {
                             clearSelection();
                             transferFocus();
                   } else {
                        transferFocus();
         class BackTabAction extends AbstractAction {
              public void actionPerformed(ActionEvent e) {
                   if (getRowCount() > 0) {
                        int row = getSelectedRow();
                        int column = getSelectedColumn();
                        if (row < 0 || column < 0) {
                             row = getRowCount() - 1;
                             column = getColumnCount() - 1;
                        do {
                             if (--column < 0) {
                                  row--;
                                  column = getColumnCount() - 1;
                        } while (row >= 0 && ! isCellTabbable(row, column));
                        if (row >= 0) {
                             changeSelection(row, column, false, false);
                        } else {
                             clearSelection();
                             transferFocusBackward();
                             KeyboardFocusManager fm = KeyboardFocusManager.getCurrentKeyboardFocusManager();
                                // fm.upFocusCycle(BTTTable_Editable.this);                         
                             // fm.focusPreviousComponent(BTTTable_Editable.this);
                   } else {     
                        // transferFocusBackward();
                        // KeyboardFocusManager fm = KeyboardFocusManager.getCurrentKeyboardFocusManager();
                           // fm.upFocusCycle(BTTTable_Editable.this);                         
                        // fm.focusPreviousComponent(BTTTable_Editable.this);
         }transferFocus() to go to the next screen component works fine - as long as I callsetFocusTraversalPolicyProvider(true); when I create the JTable.
    But the backward traversal just doesn't work - instead it does nothing the first time you press back-tab on row 0 col 0, then if you press it again, focus goes onto the last row/col of the table.
    As an alternative, I thought maybe I could call the Ctrl-back-tab action, but I can't find that registered in the action map - can anyone tell me how ctrl-back-tab is called and whether I can call that code directly?
    Any ideas?
    Thanks,
    Tim

    Where's the rest of your code? What good does posting
    the Actions do if we can't execute your code and see
    how you've installed the Actions on the table? Who
    knows where the mistake is. It may be in the posted
    code or it may be in some other code.Well I assume the Action is registered okay because back-tab within the table works fine, and in fact using a debugger I can see that the focus request code (transferFocusBackward) is being called at the right time. I followed it into that code and it appears that it is picking up the tableCellEditor as the "previous" component which is "why" it isn't working right - not that that helps me to fix it.
    Anyway, just to confirm, here is a complete standalone testcase:import java.awt.Dimension;
    import java.awt.GridBagConstraints;
    import java.awt.GridBagLayout;
    import java.awt.Insets;
    import java.awt.KeyboardFocusManager;
    import java.awt.event.ActionEvent;
    import java.awt.event.FocusEvent;
    import java.awt.event.FocusListener;
    import java.awt.event.InputEvent;
    import java.awt.event.KeyEvent;
    import javax.swing.AbstractAction;
    import javax.swing.ActionMap;
    import javax.swing.InputMap;
    import javax.swing.JComponent;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.JTextField;
    import javax.swing.KeyStroke;
    * <br>
    * <br>
    * Created on 14/11/2005 by Tim Ryan
    public class TabTable extends JTable implements FocusListener {
         protected KeyStroke TAB = KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0);
         protected KeyStroke BACK_TAB = KeyStroke.getKeyStroke(KeyEvent.VK_TAB,
                   InputEvent.SHIFT_DOWN_MASK);
         protected KeyStroke LEFT_ARROW = KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, 0);
         protected KeyStroke RIGHT_ARROW = KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, 0);
         public TabTable(Object[][] rowData, Object[] columnNames) {
              super(rowData, columnNames);
              initialise();
         public TabTable() {
              super();
              initialise();
         private void initialise() {
              addFocusListener(this);
              InputMap inMap = getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
              ActionMap actionMap = getActionMap();
              inMap.put(LEFT_ARROW, "None");
              inMap.put(RIGHT_ARROW, "None");
              actionMap.put(inMap.get(TAB), new TabAction());
              actionMap.put(inMap.get(BACK_TAB), new BackTabAction());
              setCellSelectionEnabled(true);
              putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);
              setFocusTraversalPolicyProvider(true);
         public void focusGained(FocusEvent e) {
              if (getRowCount() > 0 && getSelectedRow() < 0) {
                   editCellAt(0, 0);
                   getEditorComponent().requestFocusInWindow();
         public void focusLost(FocusEvent e) {
         public void changeSelection(int row, int column, boolean toggle, boolean extend) {
              super.changeSelection(row, column, toggle, false);
              if (editCellAt(row, column)) {
                   getEditorComponent().requestFocusInWindow();
          * This class handles the back-tab operation on the table.
          * It repeatedly steps the selection backwards until the focus
          * ends up on a cell that is allowable (see <code>isCellTabbable()</code>).
          * If already at the end of the table then focus is transferred out
          * to the previous component on the screen.
         class BackTabAction extends AbstractAction {
              public void actionPerformed(ActionEvent e) {
                   if (getRowCount() > 0) {
                        int row = getSelectedRow();
                        int column = getSelectedColumn();
                        if (row < 0 || column < 0) {
                             row = getRowCount() - 1;
                             column = getColumnCount() - 1;
                        do {
                             if (--column < 0) {
                                  row--;
                                  column = getColumnCount() - 1;
                        } while (row >= 0 && ! isCellTabbable(row, column));
                        if (row >= 0) {
                             changeSelection(row, column, false, false);
                        } else {
                             clearSelection();
                             // transferFocusBackward();
                             KeyboardFocusManager.getCurrentKeyboardFocusManager().focusPreviousComponent();
                   } else {
                        // transferFocusBackward();
                        KeyboardFocusManager.getCurrentKeyboardFocusManager().focusPreviousComponent();
          * This class handles the tab operation on the table.
          * It repeatedly steps the selection forwards until the focus ends
          * up on a cell that is allowable (see <code>isCellTabbable()</code>).
          * If already at the end of the table then focus is transferred out
          * to the next component on the screen.
         class TabAction extends AbstractAction {
              public void actionPerformed(ActionEvent e) {
                   if (getRowCount() > 0) {
                        int row = getSelectedRow();
                        int column = getSelectedColumn();
                        if (row < 0 || column < 0) {
                             row = 0;
                             column = 0;
                        do {
                             if (++column >= getColumnCount()) {
                                  row++;
                                  column = 0;
                        } while (row < getRowCount() && ! isCellTabbable(row, column));
                        if (row < getRowCount()) {
                             changeSelection(row, column, false, false);
                        } else {
                             clearSelection();
                             transferFocus();
                   } else {
                        transferFocus();
          * Some cells can be tabbed to, but are not actually editable.
          * @param row
          * @param column
          * @return
         private boolean isCellTabbable(int row, int column) {
              return (column % 2 == 0);
         public boolean isCellEditable(int row, int column) {
              return (column == 1 || column == 3);
          * @param args
         public static void main(String[] args) {
              JFrame frame = new JFrame("Tables test");
              frame.setName("TablesTest");
              frame.setSize(600, 400);
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              JPanel panelMain = new JPanel(new GridBagLayout());
              frame.add(panelMain);
              Object[][] tableData = new Object[2][6];
              Object[] columnHeadings = new Object[] {"H0", "H1", "H2", "H3", "H4", "H5"};
              GridBagConstraints gbc = new GridBagConstraints();
              gbc.anchor = GridBagConstraints.NORTH;
              gbc.insets = new Insets(10, 10, 10, 10);
              JTextField field1 = new JTextField("left", 8);
              field1.setName("left");
              panelMain.add(field1, gbc);
              Dimension tableSize = new Dimension(300, 300);
              BTTTable table3 = new BTTTable_Editable(tableData, columnHeadings);
              table3.setName("Editable");
              JScrollPane scroll3 = new JScrollPane(table3);
              scroll3.setPreferredSize(tableSize);
              panelMain.add(scroll3, gbc);
              JTextField field2 = new JTextField("right", 8);
              field2.setName("right");
              gbc.gridwidth = GridBagConstraints.REMAINDER;
              panelMain.add(field2, gbc);
              frame.setVisible(true);
    }I thought it might be the focusGained() code, but commenting that out makes no difference.
    And here is the code I would use to go to the
    previous component:
    KeyboardFocusManager.getCurrentKeyboardFocusManager().
    focusPreviousComponent();I tried that too, as you can see from my original post. It gives the same answer.
    So the big question is why does the FocusManager think that the "previous" field to the table is an editor component within the table?
    Regards,
    Tim

  • AdvancedDatagrid Tab Key issue

    Hello, I have an advancedDatagrid which contains many editable column (InpuText) and each column has an itemrender. I see that the normal TAB key navigation behaivor disapear, can any one told me what's the best way to keep the Tab (shift+Tab) navigation behaivor between editable cells ? Thank you

    I am having a simular problem. The software I am training
    requires the user to use tab between fields. I changed the shortcut
    key on text entry boxes. Somewhere on this forum (I cannot find it
    now) I found a workaround that had me change the HTML file
    Between the writeDocument <object> </object>
    tags, add the following '<param name="SeamlessTabbing"
    value="false">'+
    when I publish without quiz reporting this worked fine. (it
    matches the html of the other lines in the writeDocument But when I
    publish with quiz reporting in AICC the HTML codes between the
    writeDocument is different.
    '<param name=quality value=high> \n'+
    I altered the code I show above to match the html written by
    captivate with no results. Any thoughts?

  • Key Navigation LV8

    Hi,
    I have a program that I would like to programatically set key navigation. This is easily done with LV7 but I can not see how to do it with LV8. Any ideas?

    I can't provide an example - you have to follow the method. This is what I do:
    1. create a new vi
    2. place a system button on the front panel
    3. right click the button
    4. select the entry properties
    5. switch to the tab "Key Navigation"
    Now there should be an existing binding "Toggle" with return as assigned key.
    I do not want to have this binding if I place a new button. If I place a standard LV button, there is no binding.
    Is this a bug, a setting or maybe something NI wanted to work like this?
    Using LV8.0
    Don't be afraid to rate a good answer...

  • JTable CellEditor JComboBox Tab Key

    Hi,
    I use JDK 1.4.1_01 and got a JComboBox as CellEditor inside a JTable.
    Now I tried:
    table.setSurrendersFocusOnKeystroke(true);
    So the table gives up focus to the editor e.g. after the TAB Key is pressed while navigating through the table.
    But there is another Keyboard Event necessary to activate the JComboBox in the Editor (the arrow on the right becomes visible).
    Is there a possibility to make the JComboBox visible right after TAB was pressed?
    Thanks in advance!

    just a guess, didnt try it but... try to set
    public boolean shouldSelectCell(EventObject anEvent)
            return false;
    }in your cell editor
    hope it helps

  • Enter key to act like tab key in JTable

    I have programmed a JTable application. I want that if I press 'Enter' key in the JTable cell, the cell at right side may be selected after validating input. Similarly, when I press 'Enter' in the right most cell, the first cell of the next row may be selected after validating input.
    In other words, I like 'Enter' key to behave as forward navigational key in JTable cells like 'Tab' key, however, after validating input.
    The following is the piece of code which is not working for me. Though, it changes selection border to the next cell on pressing enter, but the focus is not shifted and editing remains in the current cell.
    //voucherTable is a JTable object with three columns.
    Action moveForward = new AbstractAction() {
    public void actionPerformed(ActionEvent e) {
    int r=voucherTable.getSelectedRow();
    int c=voucherTable.getSelectedColumn();
    if(c==2){
    c=-1;
    r+=1;
    voucherTable.changeSelection(r,c+1,false,false);
    voucherTable.getInputMap().put(KeyStroke.getKeyStroke
    (KeyEvent.VK_ENTER,0),"moveForward");
    voucherTable.getActionMap().put("moveForward",
    moveForward);
    Kindly advise me to solve the problem.
    Thanks.
    Mujjahid

    KeyStroke tab = KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0);
    KeyStroke enter = KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0);
    InputMap im = table.getInputMap(JTable.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
    im.put(enter, im.get(tab));

Maybe you are looking for

  • How to organize icons?

    I have almost four screens worth full of icons under "Applications" I'd like to have all the game icons (shortcuts?) in one "Games" folder." I'd like to have all my e-mail apps in one folder. Etc. You know, just like we do with our PCs. How do I do t

  • Re: problem signing in

    When attempting to convert PDF to DOCX, the error message was exactly as follows: "There was a problem logging in.  Try again?" with a "Yes" and a "No" button. Clicking "Yes" give the same message, "No" aborts the process.

  • Can I remove a "recorded message video" ?

    Can I remove a "recorded message video", and if so, how do I do it?

  • Map optional elements to attributes

    Hi, I am mapping 5 optional elements to a element which has 2 attributes.  I simplified my map to only check 1 optional element and then my map looks like below: So I check if the element PruchseOrderNumber which is optional exists in the source. If

  • Problems seeing my swf file after it's loaded on my server

    Hello! I loaded a swf file in a dreamweaver cs3 and tested it on a browser and works fine. However, after I uploaded everything on my server.. I don't see the swf anymore.. I loaded the scripts AC_RunActiveContent.js.. Can't find the solution for thi