Last active
February 4, 2017 14:06
-
-
Save itsakt/81e03694d75143856bb28c396509635f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ToolWindowHandler implements ToolWindowFactory { | |
private JPanel toolWindowContent; | |
private JTextField txtName; | |
private JButton btnGo; | |
private JLabel lblHello; | |
@Override | |
public void createToolWindowContent(@NotNull Project project, @NotNull ToolWindow toolWindow) { | |
ContentFactory contentFactory = ContentFactory.SERVICE.getInstance(); | |
Content content = contentFactory.createContent(toolWindowContent, "", false); | |
toolWindow.getContentManager().addContent(content); | |
btnGo.addActionListener(new ActionListener() { | |
@Override | |
public void actionPerformed(ActionEvent e) { | |
lblHello.setText("Hello " + txtName.getText() + " o/"); | |
} | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment