I added the font size but it has not changed.
btnUser.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { int x = btnUser.getX(); int y = btnUser.getY() + btnUser.getHeight(); JPopupMenu jPopupMenu = new JPopupMenu(); jPopupMenu.setFont(new Font("Tahoma", Font.PLAIN, 20)); jPopupMenu.add(new AbstractAction("Exit") { private static final long serialVersionUID = 1L; @Override public void actionPerformed(ActionEvent e) { System.exit(0); } }); jPopupMenu.show(panel, x, y); } });