Skip to content

Instantly share code, notes, and snippets.

@hendrikebbers
Created November 1, 2014 16:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hendrikebbers/386e867c3a659bd6bafd to your computer and use it in GitHub Desktop.
Save hendrikebbers/386e867c3a659bd6bafd to your computer and use it in GitHub Desktop.
JWarp Swing View
public class SwingDemoView extends JPanel {
public SwingDemoView() {
setLayout(new BorderLayout());
JButton myButton = new JButton("Get weather by city");
myButton.setName("myButton");
JTextField myTextField = new JTextField();
myTextField.setName("myTextField");
JLabel myLabel = new JLabel("Result...");
myLabel.setName("myLabel");
add(myTextField, BorderLayout.NORTH);
add(myButton, BorderLayout.CENTER);
add(myLabel, BorderLayout.SOUTH);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment