# JMenuItem Antialias

**URL:** <https://forum.inductiveautomation.com/t/jmenuitem-antialias/27556>\
**Category:** Ignition\
**Tags:** ignition79\
**Created:** [August 19, 2019, 9:14am UTC](https://forum.inductiveautomation.com/t/jmenuitem-antialias/27556 "2019-08-19T09:14:41Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [August 20, 2019, 5:56pm UTC](https://forum.inductiveautomation.com/t/jmenuitem-antialias/27556/16 "2019-08-20T17:56:34Z")

</div>

There’s a bug within the Jython interpreter. You can use the automatically-created `super__` method to directly call the super method; `super()` _should_ work but doesn’t:

```auto
from java.awt import RenderingHints
from java.awt import Toolkit
from java.util import Map
from javax.swing import JMenuItem, JComponent

from functools import partial

class antiAliasedJMI(JMenuItem):
	def paintComponent(self, g):
		g.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY)
		g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,	RenderingHints.VALUE_ANTIALIAS_ON)
		g.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON)
		g.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON)
		self.super__paintComponent(g)

a = antiAliasedJMI("text", None, action=partial(system.gui.messageBox, "title", "message"))

menu = system.gui.createPopupMenu([],[])

menu.add(a)

menu.show(event)

```

Also, I don’t think you need to override **init** , which makes it all feel a _little_ less “magic”.

---

_[View the full topic](https://forum.inductiveautomation.com/t/jmenuitem-antialias/27556)._
