This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Custom LookAndFeel and JTextArea (functional keys doesn't work) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Custom LookAndFeel and JTextArea (functional keys doesn Watch "Custom LookAndFeel and JTextArea (functional keys doesn New topic
Author

Custom LookAndFeel and JTextArea (functional keys doesn't work)

Bartek Myszkowski
Ranch Hand

Joined: Feb 03, 2009
Posts: 44
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 have no idea why...
(I have same problem with JTextField/TextFieldUI but I think the reason is the same)

Sourcecode with isolated problem:Is there any book/tutorial (that You can recommend) that describes creating custom LAF?
Bartek Myszkowski
Ranch Hand

Joined: Feb 03, 2009
Posts: 44
I have found solution on my own in Napkin LAF sourcecode.
Just if some had/will have same problem - check file NapkinLookAndFeel.java, method setupActions(table);
 
Consider Paul's rocket mass heater.
 
subject: Custom LookAndFeel and JTextArea (functional keys doesn't work)