mirror of
https://github.com/MartinThoma/LaTeX-examples.git
synced 2025-04-26 06:48:04 +02:00
22 lines
575 B
Java
22 lines
575 B
Java
import javax.swing.JButton;
|
|
import javax.swing.JFrame;
|
|
import javax.swing.JLabel;
|
|
import javax.swing.JPanel;
|
|
|
|
public class Main {
|
|
public static void main(String[] args) {
|
|
JFrame frame = new JFrame("My title!");
|
|
frame.setVisible(true);
|
|
frame.setSize(300, 150);
|
|
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
|
|
|
JPanel panel = new JPanel();
|
|
frame.add(panel);
|
|
|
|
JLabel label = new JLabel("my label");
|
|
panel.add(label);
|
|
|
|
JButton button = new JButton("my button");
|
|
panel.add(button);
|
|
}
|
|
}
|