1 | // Note: very SLOW with big text (JTextArea) |
2 | // Use showText_fast_noWrap instead |
3 | |
4 | static JTextArea showText(fS title, O text) {
|
5 | ret showText(null, title, text); |
6 | } |
7 | |
8 | static JTextArea showText(JTextArea ta, fS title, O text) {
|
9 | fS _text = str(text); |
10 | if (ta != null) |
11 | ret activateFrameAndReturnComponent(setFrameTitle(title, setText(ta, _text))); |
12 | |
13 | ret swing(func -> JTextArea {
|
14 | JTextArea textArea = newTypeWriterTextArea(_text); |
15 | makeFrame(title, new JScrollPane(textArea)); |
16 | ret textArea; |
17 | }); |
18 | } |
19 | |
20 | static JTextArea showText(O text) {
|
21 | ret showText(str(text)); |
22 | } |
23 | |
24 | static JTextArea showText(S text) {
|
25 | ret showText(autoFrameTitle(), text); |
26 | } |
27 | |
28 | static JTextArea showText() {
|
29 | ret showText("");
|
30 | } |
download show line numbers debug dex old transpilations
Travelled to 20 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, dpqxeycirhfy, gwrvuhgaqvyk, ishqpsrjomds, lnbujpyubztb, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, whxojlpjdney, xrpafgyirdlv, yanjaxplzisb
No comments. add comment
| Snippet ID: | #1001106 |
| Snippet name: | showText function |
| Eternal ID of this version: | #1001106/8 |
| Text MD5: | e244e6d89e97fa8262000113828f7236 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2020-08-28 14:03:47 |
| Source code size: | 744 bytes / 30 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 1469 / 1917 |
| Version history: | 7 change(s) |
| Referenced in: | [show references] |