Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import javax.swing.*;
import java.awt.*;

import java.awt.event.MouseEvent;

public class Main {
    public static void showPopMenu(JPopupMenu popupMenu, MouseEvent e, Component source, Component destination) {
        final MouseEvent event = SwingUtilities.convertMouseEvent(source, e, destination);
        popupMenu.show(destination, event.getX(), event.getY());
    }
}