void () { String scrollPane = JScrollPane.class.getName(); ComponentItem item = Palette.getInstance(myEditor.getProject()).getItem(scrollPane); SurroundAction action = new SurroundAction(item == null ? JBScrollPane.class.getName() : scrollPane); ArrayList<RadComponent> targetList = new ArrayList<>(Collections.singletonList(myComponent)); action.actionPerformed(myEditor, targetList, null); }