Here is Java sample code to create a menu item that will display a preview of a rubber stamp and that can added to any JMenu. The method AnnotToolbar.createStampMenuItem to create this preview menu item was added in version v2016R1 of Qoppa’s PDF components jPDFNotes and jPDFEditor.

    // Create a menu item with a preview of the rubber stamp
    JMenuItem menuItem = AnnotToolbar.createStampMenuItem("Correct",;
    // Add the menu item to the stamp menu on the toolbar
catch (PDFException ex)

You will then need to add an actionlistener to listen for the stamp action and start the “stamping”.

public void actionPerformed(ActionEvent e)
MutableDocument doc = m_NotesBean.getMutableDocument();
IAnnotationFactory factory = doc.getAnnotationFactory();       
if (e.getActionCommand() == START_STAMP)
   // create a rubber stamp using the annotation factory
   RubberStamp myStamp = factory.createRubberStamp ("Correct",;
   // make the stamp rotated by 45 degrees
   // start the stamp tool to add the rubber stamp to the page 
   m_NotesBean.startEdit (myStamp, false, false);

See a full sample when you download the full jPDFNotes Demo / Sample application under jPDFNotesSamples under package jPDFNotesSamples.customStamps.