我的代码:
class PanelGlowny extends JPanel implements ActionListener{}
public class Formatka extends JFrame implements ActionListener{
private JMenuItem klienciMenuItem = new JMenuItem("Klienci");
private JPopupMenu menuPopup = new JPopupMenu();
private PanelGlowny panelGlowny = new PanelGlowny();
public Formatka() {
add(panelGlowny, BorderLayout.CENTER);
menuPopup.add(klienciMenuItem);
panelGlowny.setComponentPopupMenu(menuPopup);
}
}
And i do not see popupmenu when i click right button on mouse. Why?