import javax.swing.JFrame; import javax.swing.JButton; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; class Program01 extends JFrame { private JButton gomb; Program01() { gomb = new JButton(); gomb.setText("Klikkelj ide"); gomb.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { GombActionPerformed(e); } }); add(gomb); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); pack(); } private void GombActionPerformed(ActionEvent e) { } public static void main(String[] args) { try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(Program01.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(Program01.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(Program01.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(Program01.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } new Program01().setVisible(true); } }