import javax.swing.*; import java.awt.*; class Program extends JFrame { JLabel cimke; JLabel cimke2; Program() { cimke = new JLabel("Valamiaaaaaaaaaaa"); cimke2 = new JLabel("rövid", JLabel.CENTER); cimke.setForeground(Color.blue); cimke.setFont(new Font("Arial", Font.BOLD, 20)); setLayout(new GridLayout(0,1)); add(cimke); add(cimke2); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); pack(); setVisible(true); } public static void main(String args[]) { new Program(); } }