
ch.inftec.gui.SwingHelloWorld Maven / Gradle / Ivy
package ch.inftec.gui;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
public class SwingHelloWorld {
public static void main(String args[]) {
JFrame frame = new JFrame("Hello World");
JPanel p = new JPanel();
JLabel l = new JLabel("Hello World");
p.add(l);
frame.getContentPane().add(p);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setVisible(true);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy