Libraryless. Click here for Pure Java version (2896L/17K).
1 | static JTextArea enableWordWrapForTextArea(JTextArea ta) {
|
2 | ret enableWordWrapForTextArea(ta, true); |
3 | } |
4 | |
5 | static JTextArea enableWordWrapForTextArea(JTextArea ta, bool enabled) {
|
6 | if (ta != null) swing {
|
7 | ta.setLineWrap(enabled); |
8 | ta.setWrapStyleWord(true); |
9 | // Haven't found a way to reliable enable word-wrapping for |
10 | // an already visible text area |
11 | //revalidate(enclosingScrollPane(ta)); |
12 | } |
13 | ret ta; |
14 | } |
Began life as a copy of #1008025
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
| Snippet ID: | #1016623 |
| Snippet name: | enableWordWrapForTextArea |
| Eternal ID of this version: | #1016623/7 |
| Text MD5: | 5c797868d9ddf83e7ffce14a9f3fce06 |
| Transpilation MD5: | ca1f8ef857ad8aa8d1cb219108829648 |
| Author: | stefan |
| Category: | javax / gui |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2021-01-14 17:22:28 |
| Source code size: | 435 bytes / 14 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 846 / 1008 |
| Version history: | 6 change(s) |
| Referenced in: | [show references] |