static JFrame renewFrame(final JFrame frame) { if (frame == null) null; ret (JFrame) swing(func { Container content = frame.getContentPane(); JFrame frame2 = makeFrame(frame.getTitle()); frame2.setBounds(frame.getBounds()); pcall { frame2.setIconImages(frame.getIconImages()); } frame2.setDefaultCloseOperation(frame.getDefaultCloseOperation()); bool active = isActiveFrame(frame); frame2.setAutoRequestFocus(active); for (WindowListener wl : frame.getWindowListeners()) frame2.addWindowListener(wl); frame.setContentPane(new JPanel); frame2.setContentPane(content); frame2.setVisible(true); frame.dispose(); ret frame2; }); }
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: | #1007068 |
Snippet name: | renewFrame - upgrade frame title to current look&feel |
Eternal ID of this version: | #1007068/18 |
Text MD5: | d9760a59b5c04294be48b129f9001476 |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-05-26 13:47:54 |
Source code size: | 708 bytes / 19 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 532 / 544 |
Version history: | 17 change(s) |
Referenced in: | [show references] |