Package javax.swing

Examples of javax.swing.JList.requestFocus()


            });
            w.add(new JScrollPane(jList), BorderLayout.CENTER);
            w.setPreferredSize(new Dimension(200, 200));
            Rectangle position = editorTextArea.modelToView(caretPosition);
            w.show(editorTextArea, position.x + position.width, position.y + position.height);
            jList.requestFocus();
        } catch (BadLocationException e) {
            e.printStackTrace();
        }
    }
View Full Code Here


          public void keyPressed(KeyEvent e) {
            if(e.getKeyCode() == KeyEvent.VK_DOWN) {
                    ListModel model = tableNamesJList.getModel();
                    if(model.getSize() >= 1) {
                      tableNamesJList.setSelectedIndex(0);
                      tableNamesJList.requestFocus();
                    }
            }
          }
    });
        tableNamesJList.addKeyListener(new KeyAdapter() {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.