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

6
LINES

< > BotCompany Repo | #1009786 - componentToJComponent - for binding timers to components etc.

JavaX fragment (include)

static JComponent componentToJComponent(Component c) {
  if (c instanceof JComponent) ret (JComponent) c;
  if (c instanceof JFrame) ret ((JFrame) c).getRootPane();
  if (c == null) null;
  fail("boohoo " + getClassName(c));
}

download  show line numbers  debug dex   

Travelled to 11 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz

No comments. add comment

Snippet ID: #1009786
Snippet name: componentToJComponent - for binding timers to components etc.
Eternal ID of this version: #1009786/3
Text MD5: a41a4125bebc9d954562dd30762300df
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-08-16 20:09:57
Source code size: 233 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 241 / 268
Version history: 2 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1009786 & http://1009786.tinybrain.de