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

15
LINES

< > TinyBrain | #1003464 - getTitlePaneComponent

JavaX fragment (include)

static JComponent getTitlePaneComponent(Window window) {
  if (!substanceLookAndFeelEnabled()) ret null;
  
	JRootPane rootPane = null;
	if (window instanceof JFrame)
		rootPane = ((JFrame) window).getRootPane();
	if (window instanceof JDialog)
		rootPane = ((JDialog) window).getRootPane();
	if (rootPane != null) {
		O /*SubstanceRootPaneUI*/ ui = rootPane.getUI();
		return (JComponent) call(ui, "getTitlePane");
	}
	return null;
}

download  show line numbers  debug dex   

Travelled to 3 computer(s): cfunsshuasjs, ddnzoavkxhuk, tvejysmllsmz

No comments. add comment

Snippet ID: #1003464
Snippet name: getTitlePaneComponent
Eternal ID of this version: #1003464/2
Text MD5: 30544d9eea0459866903402adea894d8
Author: stefan
Category: javax / talking robots
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-03-18 15:23:59
Source code size: 449 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 110 / 191
Version history: 1 change(s)
Referenced in: [show]