dobrý den, mam problém s vytvořením akce pro tlačítko v JAVA, tlačítko mám již vytvořené, ale nevím jak pro něj vytvořit akci, zde přikládám kód: package strategy_game_java;import java.awt.*;import java.awt.Container;import java.awt.FlowLayout;import javax.swing.ImageIcon;import javax.swing.JButton;import javax.swing.JFrame;import java.applet.*;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import java.awt.event.MouseEvent;import javax.swing.SwingUtilities;public class Strategy_Game_JAVA { public static void main(String[] args) { JFrame game = new JFrame("PODDANÍ"); game.setSize(200, 300); Container content = game.getContentPane(); content.setBackground(Color.gray); content.setLayout(new FlowLayout()); content.add(new Label(" **Vesničani** ")); game.addWindowListener(new ExitListener()); int s = 0; content.add(new Label(" "+s+" ")); game.addWindowListener(new ExitListener()); JButton button1 = new JButton("Vesničan +1"); content.add(button1); game.addWindowListener(new ExitListener()); JButton button2 = new JButton("Vesničan -1"); content.add(button2); game.addWindowListener(new ExitListener()); content.add(new Label(" Zlato ")); game.addWindowListener(new ExitListener()); int z = 200; content.add(new Label(" "+z+" ")); content.add(new Label(" Dřevo"));… int d = 100; content.add(new Label(" "+d+" ")); game.addWindowListener(new ExitListener()); game.setVisible(true); } }potřeboval bych aby se po kliknutí na tlačítko Vesničan +, přičetl k s (int s = s+1) nevím jak to napsat tak aby to fungovalo, a zároveň aby se odečetlo dřevo a zlato.Děkuji za veškeré rady a odpovědi Fanda. Ukázat celý příspěvek