Java tutorial
package com.maddyhome.idea.copyright.ui; /* * Copyright - Copyright notice updater for IDEA * Copyright (C) 2004-2005 Rick Maddy. All Rights Reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ import com.intellij.openapi.module.Module; import com.intellij.openapi.project.Project; import com.intellij.openapi.ui.DialogWrapper; import com.intellij.uiDesigner.core.GridConstraints; import com.intellij.uiDesigner.core.GridLayoutManager; import java.awt.Insets; import javax.swing.JComponent; import javax.swing.JLabel; import javax.swing.JPanel; public class ModuleDlg extends DialogWrapper { public ModuleDlg(Project project, Module module) { super(project, false); this.module = module; setupControls(); init(); } private void setupControls() { setTitle("Update Copyright"); setOKButtonText("Run"); lblModule.setText("Module '" + module.getName() + '\''); } protected JComponent createCenterPanel() { return mainPanel; } { // GUI initializer generated by IntelliJ IDEA GUI Designer // >>> IMPORTANT!! <<< // DO NOT EDIT OR ADD ANY CODE HERE! $$$setupUI$$$(); } /** * Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR call it in your * code! */ private void $$$setupUI$$$() { mainPanel = new JPanel(); mainPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); lblModule = new JLabel(); lblModule.setText("Module"); mainPanel.add(lblModule, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null)); } private Module module; private JPanel mainPanel; private JLabel lblModule; }