Skip to content

Instantly share code, notes, and snippets.

@uncoded-ro
Created January 9, 2020 12:57
Show Gist options
  • Save uncoded-ro/866cb14c2683a19a66a731e7863d0738 to your computer and use it in GitHub Desktop.
Save uncoded-ro/866cb14c2683a19a66a731e7863d0738 to your computer and use it in GitHub Desktop.
package ro.virtualcampus.gui;
import java.awt.*;
import javax.swing.*;
public class FlowLayoutApp {
public static void main(String args[]) {
JFrame container = new JFrame("Flow Layout");
container.setLayout(new FlowLayout(FlowLayout.CENTER));
container.setLocation(100, 100);
container.add(new JLabel("Eticheta 1"));
container.add(new JLabel("Eticheta 2"));
container.add(new JLabel("Eticheta 3"));
container.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
container.pack();
container.setVisible(true);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment