- File splitter size textfield format fix
This commit is contained in:
tonikelope 2020-01-05 12:36:39 +01:00
parent 4174cfe777
commit 06dfd1183b
4 changed files with 16 additions and 2 deletions

View File

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.tonikelope</groupId>
<artifactId>MegaBasterd</artifactId>
<version>6.98</version>
<version>6.99</version>
<packaging>jar</packaging>
<dependencies>
<dependency>

View File

@ -34,6 +34,7 @@ import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.BorderFactory;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import static javax.swing.WindowConstants.DISPOSE_ON_CLOSE;
@ -69,6 +70,19 @@ public class FileSplitterDialog extends javax.swing.JDialog {
jProgressBar2.setValue(0);
jProgressBar2.setVisible(false);
split_size_text.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyReleased(java.awt.event.KeyEvent evt) {
try {
Integer.parseInt(split_size_text.getText());
} catch (Exception e) {
split_size_text.setText(split_size_text.getText().substring(0, Math.max(0, split_size_text.getText().length() - 1)));
}
}
});
split_size_text.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
pack();
}

View File

@ -54,7 +54,7 @@ import javax.swing.UIManager;
*/
public final class MainPanel {
public static final String VERSION = "6.98";
public static final String VERSION = "6.99";
public static final int THROTTLE_SLICE_SIZE = 16 * 1024;
public static final int DEFAULT_BYTE_BUFFER_SIZE = 16 * 1024;
public static final int STREAMER_PORT = 1337;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 198 KiB

After

Width:  |  Height:  |  Size: 195 KiB