Я хотел бы добавить способ прокрутки пунктов меню в JPopupMenu
, что очень похоже на прокрутку списка элементов в JComboBox
.
Скажем, у меня есть 10 пунктов меню. Я хотел бы отображать только 5 пунктов меню за раз, и я бы использовал кнопку вертикальной прокрутки внизу или сверху JPopupMenu
, чтобы отобразить пункты меню, которые не указаны, и скрыть те, которые я только что видел.
Возможно ли это? Я использую JIDE Software JideSplitButton
, который отображает JPopupMenu
при нажатии. Я пытаюсь сохранить внешний вид командной строки, на которой я разместил JideSplitButton
, поэтому я не хочу заменять его JComboBox
, если только мне это не нужно.