Key « JTextArea « Java Swing Q&A





1. JScrollPane scrolling with arrow keys    stackoverflow.com

I've a JTextArea component inside JScrollPane and the text area is not editable. I would like to enable scrolling of the text area with up and down arrow keys (i.e. pressing ...

3. JTextArea and KeyEvent    coderanch.com

4. JScrollPane/JTextArea - Disabling Keyboard Events    coderanch.com

key bindings is probably the better way to go, but this seems to work OK (the combobox is just to see if the arrow keys work outside the textArea) import javax.swing.*; import java.awt.*; import java.awt.event.*; class Testing extends JFrame { JTextArea ta = new JTextArea(5,10); boolean arrowKey; public Testing() { setLocation(300,200); setDefaultCloseOperation(EXIT_ON_CLOSE); JScrollPane sp = new JScrollPane(ta); JScrollBar sb = sp.getVerticalScrollBar(); ...

5. Custom LookAndFeel and JTextArea (functional keys doesn't work)    coderanch.com

Hello again, I am learning how to create custom LAF and I have found problem with JTextArea. I have written a TextAreaUI that extends BasicTextAreaUI (but I have left it almost empty). When I use my LAF and create a JTextArea all is fine but functional keys like enter, delete, backspace and arrows just doesn't work for created JTextArea and I ...

6. How to manipuate JtextArea from a Key pressed event    forums.oracle.com

err how am i suppose to use textInAE in my constructor? or in the main method for that matter, if made public can this be used in main or in the constructor for InteractiveGUI? on another note, once i set the text to null, the thing is active (whrere the blining line is) is below the viewing space i gave it, ...