From 32a4e4563852685fbf06c68bb5f4e3ec3f702202 Mon Sep 17 00:00:00 2001 From: Downforce Agent Date: Sat, 13 Jul 2024 22:01:02 -0500 Subject: [PATCH] prevent automatically scrolling to the bottom when mod details exceed window size --- firestar/src/main/java/Bert.java | 2 +- firestar/src/main/java/MasterWindowLayout.form | 3 ++- firestar/src/main/java/MissPiggy.java | 4 ++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/firestar/src/main/java/Bert.java b/firestar/src/main/java/Bert.java index 321ecbe..522b98e 100644 --- a/firestar/src/main/java/Bert.java +++ b/firestar/src/main/java/Bert.java @@ -178,7 +178,7 @@ public class Bert implements ActionListener { // dump contents System.out.println("Extracting " + arcname); Fozzie popup = new Fozzie(); - popup.displayTextOnly("Extracting" + arcname + "...", "Extracting"); + popup.displayTextOnly("Extracting " + arcname + "...", "Extracting"); Process p; try { if (!Main.windows) { diff --git a/firestar/src/main/java/MasterWindowLayout.form b/firestar/src/main/java/MasterWindowLayout.form index 2e6d399..4ba2e1d 100644 --- a/firestar/src/main/java/MasterWindowLayout.form +++ b/firestar/src/main/java/MasterWindowLayout.form @@ -30,11 +30,12 @@ - + + diff --git a/firestar/src/main/java/MissPiggy.java b/firestar/src/main/java/MissPiggy.java index 308fd5e..f271a86 100644 --- a/firestar/src/main/java/MissPiggy.java +++ b/firestar/src/main/java/MissPiggy.java @@ -20,6 +20,7 @@ import javax.imageio.ImageIO; import javax.swing.*; import javax.swing.event.ListSelectionListener; import javax.swing.filechooser.FileNameExtensionFilter; +import javax.swing.text.DefaultCaret; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @@ -71,6 +72,7 @@ public class MissPiggy implements ActionListener { private JButton importButton; private JButton deployButton; private JTextPane descriptionField; + private JScrollPane descriptionScroller; //private int selectedItem; @@ -175,6 +177,8 @@ public class MissPiggy implements ActionListener { importButton.setFont(Main.fExo2.deriveFont(Font.BOLD).deriveFont(12f)); deployButton.setFont(Main.fExo2.deriveFont(Font.BOLD).deriveFont(12f)); + ((DefaultCaret)descriptionField.getCaret()).setUpdatePolicy(DefaultCaret.NEVER_UPDATE); // prevent automatically scrolling to the bottom when mod details exceed window size + frame.setSize(800, 600); // 1280 800 frame.setMinimumSize(new Dimension(640,480)); frame.setTitle("Firestar Mod Manager");