code: private void readmeMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_readmeMenuItemActionPerformed
          try {
              JTextArea textArea = new JTextArea();
              Font font = textArea.getFont();
              textArea.setFont(new Font("Monospaced", font.getStyle(), font.getSize()));
              textArea.setEditable(false);
  
              String text = "";
              BufferedReader r = new BufferedReader(new FileReader(
                      myDirectory + File.separator + "../README.md"));
              String line;
              while ((line = r.readLine()) != null) {
                  text += line + '\n';
              }
  
              textArea.setText(text);
              textArea.setCaretPosition(0);
              textArea.setLineWrap(true);
              textArea.setWrapStyleWord(true);
              textArea.setColumns(80);
  
              // stuff it in a scrollpane with a controlled size.
              JScrollPane scrollPane = new JScrollPane(textArea);
              Dimension dim = textArea.getPreferredSize();
              dim.height = dim.width*50/80;
              scrollPane.setPreferredSize(dim);
  
              // pass the scrollpane to the joptionpane.
              JDialog dialog = new JOptionPane(scrollPane, JOptionPane.PLAIN_MESSAGE).
                      createDialog(this, "README");
              dialog.setResizable(true);
              dialog.setModalityType(ModalityType.MODELESS);
              dialog.setVisible(true);
          } catch (Exception ex) {
              Logger.getLogger(MainFrame.class.getName()).log(Level.SEVERE, null, ex);
          }
      }
docs: GEN-LAST:event_trackingStopMenuItemActionPerformed