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

9
LINES

< > BotCompany Repo | #1033897 // setDialogContents

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (6517L/36K).

1  
svoid setDialogContents(JDialog dialog, JComponent contents) {
2  
  if (dialog == null) ret;
3  
  swing {
4  
    dialog.getContentPane().removeAll();
5  
    dialog.getContentPane().setLayout(new BorderLayout);
6  
    dialog.getContentPane().add(wrap(contents));
7  
    revalidate(dialog);
8  
  }
9  
}

Author comment

Began life as a copy of #1003379

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1033897
Snippet name: setDialogContents
Eternal ID of this version: #1033897/1
Text MD5: a22816a1dedfdf2b5e689e0d8c2f4f52
Transpilation MD5: 477cc8ff9836f22aed432c8b7af7fa32
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-01-09 18:34:42
Source code size: 284 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 144 / 203
Referenced in: [show references]