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