From d50b4f00429ae283b323cc2b80dab4e619bea71f Mon Sep 17 00:00:00 2001 From: Arthur7770 <78031901+Arthur7770@users.noreply.github.com> Date: Tue, 30 Mar 2021 16:04:09 +0200 Subject: [PATCH] Add a scroll-control on the spinner --- src/lsystem/screen/main/Listener.java | 17 +++++++++++------ src/lsystem/screen/main/Tab.java | 6 ++---- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/lsystem/screen/main/Listener.java b/src/lsystem/screen/main/Listener.java index 06e1975..275038d 100644 --- a/src/lsystem/screen/main/Listener.java +++ b/src/lsystem/screen/main/Listener.java @@ -7,13 +7,10 @@ import lsystem.utils.Pair; import javax.swing.*; import java.awt.*; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.event.KeyEvent; -import java.awt.event.KeyListener; +import java.awt.event.*; import java.util.List; -public class Listener implements ActionListener, KeyListener { +public class Listener implements ActionListener, KeyListener, MouseWheelListener { Tab tab; MainFrame frame; Integer index; @@ -36,7 +33,7 @@ public class Listener implements ActionListener, KeyListener { case "Close": frame.getTab().removeTabAt(index-1); frame.decreaseTab(); - for(int i = 0; i