1 | static JPanel infoMessage_makePanel(S text) { |
2 | final JTextArea ta = wrappedTextArea(text); |
3 | onClick(ta, r { disposeWindow(ta) }); |
4 | int size = 14; |
5 | if (l(text) <= 50) size *= 2; |
6 | else if (l(text) < 100) size = iround(size*1.5); |
7 | ta.setFont(typeWriterFont(size)); |
8 | JScrollPane sp = jscroll(ta); |
9 | ret withMargin(sp); |
10 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1012851 |
Snippet name: | infoMessage_makePanel |
Eternal ID of this version: | #1012851/3 |
Text MD5: | f15ba371633aa4d1e376ba87b48f89f3 |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-12-14 19:25:12 |
Source code size: | 332 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 438 / 461 |
Version history: | 2 change(s) |
Referenced in: | [show references] |