Here you can find the source of setViewportMenu(JComponent c)
public static void setViewportMenu(JComponent c)
//package com.java2s; /*//from ww w. j a va2s . c o m * Copyright (C) 2015 University of Oregon * * You may distribute under the terms of either the GNU General Public * License or the Apache License, as specified in the LICENSE file. * * For more information, see the LICENSE file. */ import javax.swing.*; public class Main { private static JComponent vpMenu = null; public static void setViewportMenu(JComponent c) { vpMenu = c; } }