Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

12
LINES

< > BotCompany Repo | #1003378 // revalidate - update & repaint a component/frame after any change

JavaX fragment (include)

1  
static <A extends Component> A revalidate(final A c) {
2  
  if (c == null || !c.isShowing()) ret c;
3  
  swing {
4  
    // magic combo to actually relayout and repaint
5  
    c.revalidate();
6  
    c.repaint();
7  
  }
8  
  ret c;
9  
}
10  
11  
static void revalidate(JFrame f) { revalidate((Component) f); }
12  
static void revalidate(JInternalFrame f) { revalidate((Component) f); }

Author comment

Began life as a copy of #1001528

download  show line numbers  debug dex  old transpilations   

Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1003378
Snippet name: revalidate - update & repaint a component/frame after any change
Eternal ID of this version: #1003378/7
Text MD5: dd0a4172ed9db07a31ad51d4af48a3b4
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-04-15 04:03:20
Source code size: 358 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 702 / 750
Version history: 6 change(s)
Referenced in: [show references]