Setup a new panel.
190120
public void setupPanel()
    {
        this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
        this.addGridHeading();

        JPanel panel = new JPanel();
        panel.setOpaque(false);
        panel.setMinimumSize(new Dimension(20, 20));
        panel.setLayout(new BorderLayout());
        JScrollPane scrollPane = new JScrollPane(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
        panel.add(scrollPane);
        this.add(panel);
        m_panelGrid = new JPanel();
        JPanel panelAligner = new JPanel(); // This panel keeps the panelgrid in the upper left hand of the scrollpane.
        panelAligner.add(m_panelGrid);
        panelAligner.setLayout(new FlowLayout(FlowLayout.LEADING));
        scrollPane.getViewport().add(panelAligner);
        panelAligner.setOpaque(false);
        m_panelGrid.setOpaque(false);
        scrollPane.getViewport().setOpaque(false);
        scrollPane.setOpaque(false);

        this.addGridDetail();
    }
407726
def setup_ui(self, ):
        
        log.debug("Setting up the ui")
        self.setup_prjs_page()
        self.setup_prj_page()
        self.setup_seq_page()
        self.setup_shot_page()
        self.setup_atype_page()
        self.setup_asset_page()
        self.setup_dep_page()
        self.setup_task_page()
        self.setup_users_page()
        self.setup_user_page()
736815
def setup_gui(self):
        """"""
        scrollarea = self.setup_scrollarea()
        up_btn, down_btn = self.setup_arrow_buttons()

        self.setFixedWidth(150)
        layout = QVBoxLayout(self)
        layout.setContentsMargins(0, 0, 0, 0)
        layout.setSpacing(0)
        layout.addWidget(up_btn)
        layout.addWidget(scrollarea)
        layout.addWidget(down_btn)
244355
private void initialize() {
		this.setLayout(new CardLayout());
		this.setName(getPanelName(getContextIndex()));
		this.add(getPanelSession(), getPanelSession().getName());
	}
1309935
private void setUp() {
		addExamples("AJAX", ExampleData.AJAX_EXAMPLES);
		addExamples("Form controls", ExampleData.FORM_CONTROLS);
		addExamples("Feedback and indicators", ExampleData.FEEDBACK_AND_INDICATORS);
		addExamples("Layout", ExampleData.LAYOUT_EXAMPLES);
		addExamples("Menus", ExampleData.MENU_EXAMPLES);
		addExamples("Links", ExampleData.LINK_EXAMPLES);
		addExamples("Popups / dialogs", ExampleData.POPUP_EXAMPLES);
		addExamples("Subordinate", ExampleData.SUBORDINATE_EXAMPLES);
		addExamples("Tabs", ExampleData.TABSET_EXAMPLES);
		addExamples("Tables", ExampleData.WTABLE_EXAMPLES);
		addExamples("Validation", ExampleData.VALIDATION_EXAMPLES);
		addExamples("Other examples (uncategorised)", ExampleData.MISC_EXAMPLES);
		addExamples("DataTable (deprecated)", ExampleData.WDATATABLE_EXAMPLES);
	}
1184073
def init_ui(self):
        """"""
        board_width = self.ms_game.board_width
        board_height = self.ms_game.board_height
        self.create_grid(board_width, board_height)
        self.time = 0
        self.timer = QtCore.QTimer()
        self.timer.timeout.connect(self.timing_game)
        self.timer.start(1000)
1291983
private void initGUI() {

        Panel pQuery   = new Panel();
        Panel pCommand = new Panel();

        // define a Panel pCard which takes four different cards/views:
        // tree of tables, command SQL text area, result window and an editor/input form
        pCard      = new Panel();
        layoutCard = new CardLayout(2, 2);

        pCard.setLayout(layoutCard);

        // four buttons at the top to quickly switch between the four views
        butTree    = new Button("Tree");
        butCommand = new Button("Command");
        butResult  = new Button("Result");
        butEditor  = new Button("Editor");

        butTree.addActionListener(this);
        butCommand.addActionListener(this);
        butResult.addActionListener(this);
        butEditor.addActionListener(this);

        Panel pButtons = new Panel();

        pButtons.setLayout(new GridLayout(1, 4, 8, 8));
        pButtons.add(butTree);
        pButtons.add(butCommand);
        pButtons.add(butResult);
        pButtons.add(butEditor);

        pResult = new Panel();

        pQuery.setLayout(new BorderLayout());
        pCommand.setLayout(new BorderLayout());
        pResult.setLayout(new BorderLayout());

        Font fFont = new Font("Dialog", Font.PLAIN, 12);

        txtCommand = new TextArea(5, 40);

        txtCommand.addKeyListener(this);

        txtResult = new TextArea(20, 40);

        txtCommand.setFont(fFont);
        txtResult.setFont(new Font("Courier", Font.PLAIN, 12));

        butExecute = new Button("Execute");

        butExecute.addActionListener(this);
        pCommand.add("South", butExecute);
        pCommand.add("Center", txtCommand);

        gResult = new Grid();

        setLayout(new BorderLayout());
        pResult.add("Center", gResult);

        tTree = new Tree();

        tTree.setMinimumSize(new Dimension(200, 100));
        gResult.setMinimumSize(new Dimension(200, 300));

        eEditor = new ZaurusEditor();

        pCard.add("tree", tTree);
        pCard.add("command", pCommand);
        pCard.add("result", pResult);
        pCard.add("editor", eEditor);
        fMain.add("Center", pCard);
        fMain.add("North", pButtons);
        doLayout();
        fMain.pack();
    }
269071
public void addPolicyPanel(AbstractParamPanel panel) {
        this.additionalPanels.add(panel);
        addParamPanel(ROOT, panel.getName(), panel, true);
    }
254737
def set_current(self, panel):
        
        where = slice(self._start_index, self._pos)
        self.buffer.values[:, where, :] = panel.values
1147444
public function projectSetupNew()
    {
        $this->executeCommandHook(__FUNCTION__, 'before');
        $this->projectInstance()->setupNewProject();
        $this->executeCommandHook(__FUNCTION__, 'after');
    }
1219725
def setup(self, app):
        """"""
        super().setup(app)
        self.cfg.port = int(self.cfg.port)
        self.cfg.db = int(self.cfg.db)
        self.cfg.poolsize = int(self.cfg.poolsize)
118259
def create_new_project(self):
        """"""
        self.switch_to_plugin()
        active_project = self.current_active_project
        dlg = ProjectDialog(self)
        dlg.sig_project_creation_requested.connect(self._create_project)
        dlg.sig_project_creation_requested.connect(self.sig_project_created)
        if dlg.exec_():
            if (active_project is None
                    and self.get_option('visible_if_project_open')):
                self.show_explorer()
            self.sig_pythonpath_changed.emit()
            self.restart_consoles()
674375
def add_text(self, text, x, y, **kws):
        """"""
        self.panel.add_text(text, x, y, **kws)
234764
function setup() {
    var tmp = get('skin');
    if (tmp && $.inArray(tmp, my_skins))
      change_skin(tmp);

    //Add the change skin listener
    $("[data-skin]").on('click', function (e) {
      if($(this).hasClass('knob'))
        return;
      e.preventDefault();
      change_skin($(this).data('skin'));
    });

    //Add the layout manager
    $("[data-layout]").on('click', function () {
      change_layout($(this).data('layout'));
    });

    $("[data-controlsidebar]").on('click', function () {
      change_layout($(this).data('controlsidebar'));
      var slide = !AdminLTE.options.controlSidebarOptions.slide;
      AdminLTE.options.controlSidebarOptions.slide = slide;
      if (!slide)
        $('.control-sidebar').removeClass('control-sidebar-open');
    });

    $("[data-sidebarskin='toggle']").on('click', function () {
      var sidebar = $(".control-sidebar");
      if (sidebar.hasClass("control-sidebar-dark")) {
        sidebar.removeClass("control-sidebar-dark")
        sidebar.addClass("control-sidebar-light")
      } else {
        sidebar.removeClass("control-sidebar-light")
        sidebar.addClass("control-sidebar-dark")
      }
    });

    $("[data-enable='expandOnHover']").on('click', function () {
      $(this).attr('disabled', true);
      AdminLTE.pushMenu.expandOnHover();
      if (!$('body').hasClass('sidebar-collapse'))
        $("[data-layout='sidebar-collapse']").click();
    });

    // Reset options
    if ($('body').hasClass('fixed')) {
      $("[data-layout='fixed']").attr('checked', 'checked');
    }
    if ($('body').hasClass('layout-boxed')) {
      $("[data-layout='layout-boxed']").attr('checked', 'checked');
    }
    if ($('body').hasClass('sidebar-collapse')) {
      $("[data-layout='sidebar-collapse']").attr('checked', 'checked');
    }

  }
937932
public void setupMiddleSFields()
    {
        new SCannedBox(this.getNextLocation(ScreenConstants.RIGHT_OF_LAST_BUTTON_WITH_GAP, ScreenConstants.SET_ANCHOR), this, null, ScreenConstants.DEFAULT_DISPLAY, MenuConstants.DISPLAY);
        new SCannedBox(this.getNextLocation(ScreenConstants.RIGHT_OF_LAST_BUTTON_WITH_GAP, ScreenConstants.SET_ANCHOR), this, null, ScreenConstants.DEFAULT_DISPLAY, MenuConstants.PRINT);
    }
874023
public function setup(){
		if($this->hasOption('autoinit') && $this->options()->autoinit){
			if($this->hasOption('default')){
				$this->setValue($this->options()->default);
			}else{
				$this->setValue('now');
			}
		}
	}
1209476
def setup(self):
        """"""

        self.allow = self.config['allow']
        self.halt = self.config['halt']
        self.skip = self.config['skip']