1919import javax .swing .border .EtchedBorder ;
2020import javax .swing .event .DocumentEvent ;
2121import javax .swing .event .DocumentListener ;
22+ import javax .swing .text .BadLocationException ;
23+ import javax .swing .text .DefaultHighlighter ;
2224
2325public class ConfigPanel extends JPanel {
2426 private final JTextField inputField ;
@@ -33,24 +35,74 @@ public ConfigPanel() {
3335
3436 // Create compound border with titled border and empty border for padding
3537 setBorder (BorderFactory .createCompoundBorder (
36- // Outer titled border
3738 BorderFactory .createTitledBorder (
38- BorderFactory .createEtchedBorder (EtchedBorder .RAISED ), // Rounded line border with increased arc
39+ BorderFactory .createEtchedBorder (EtchedBorder .RAISED ),
3940 "Configuration" ,
4041 javax .swing .border .TitledBorder .DEFAULT_JUSTIFICATION ,
4142 javax .swing .border .TitledBorder .DEFAULT_POSITION ,
4243 new Font ("Segoe UI" , Font .BOLD , 16 )
4344 ),
44- // Inner empty border for padding
4545 BorderFactory .createEmptyBorder (20 , 0 , 10 , 0 )
4646 ));
47+ // Add description panel at the top
48+ JTextArea descriptionArea = new JTextArea (
49+ "Configure your obfuscation settings below:\n \n " +
50+ "• Input JAR: Select the Java archive (.jar) file you want to obfuscate\n " +
51+ "• Output JAR: Choose where to save the obfuscated file (.jar, .apk, or .dex)\n " +
52+ "• Libraries: (Optional) Directory containing dependency JARs needed by your application\n " +
53+ "• Runtime: JDK runtime libraries required for compilation (auto-downloaded)\n " +
54+ "• Debug Mode: Enable additional logging and debugging information\n \n "
55+ );
56+ descriptionArea .setEditable (false );
57+ descriptionArea .setFont (new Font ("Segoe UI" , Font .PLAIN , 12 ));
58+ descriptionArea .setLineWrap (true );
59+ descriptionArea .setWrapStyleWord (true );
60+ descriptionArea .setBackground (null );
61+ descriptionArea .setBorder (null );
4762
48- // Load configuration
49- config = SkidfuscatorConfig .load ();
63+ // Create indicator panel
64+ JPanel indicatorPanel = new JPanel ();
65+ indicatorPanel .setLayout (new BoxLayout (indicatorPanel , BoxLayout .Y_AXIS ));
66+ indicatorPanel .setBorder (BorderFactory .createEmptyBorder (10 , 0 , 0 , 0 ));
67+
68+ // Add indicators with colored symbols
69+ JLabel validLabel = new JLabel ("✓ Green checkmarks indicate valid configurations" );
70+ validLabel .setFont (new Font ("Segoe UI" , Font .PLAIN , 12 ));
71+ validLabel .setForeground (new Color (0x2ECC40 ));
72+
73+ JLabel errorLabel = new JLabel ("✗ Red X marks indicate issues that need to be resolved" );
74+ errorLabel .setFont (new Font ("Segoe UI" , Font .PLAIN , 12 ));
75+ errorLabel .setForeground (new Color (0xFF4136 ));
76+
77+ JLabel optionalLabel = new JLabel ("● Orange dots indicate optional fields" );
78+ optionalLabel .setFont (new Font ("Segoe UI" , Font .PLAIN , 12 ));
79+ optionalLabel .setForeground (new Color (0xFF851B ));
80+
81+ indicatorPanel .add (validLabel );
82+ indicatorPanel .add (Box .createVerticalStrut (5 ));
83+ indicatorPanel .add (errorLabel );
84+ indicatorPanel .add (Box .createVerticalStrut (5 ));
85+ indicatorPanel .add (optionalLabel );
5086
87+ // Add components to panel
5188 GridBagConstraints gbc = new GridBagConstraints ();
5289 gbc .fill = GridBagConstraints .HORIZONTAL ;
53- gbc .insets = new Insets (5 , 5 , 5 , 5 );
90+ gbc .insets = new Insets (0 , 5 , 0 , 5 );
91+ gbc .gridx = 0 ;
92+ gbc .gridy = 20 ;
93+ gbc .gridwidth = 3 ;
94+ add (descriptionArea , gbc );
95+
96+ gbc .gridy = -1 ;
97+ gbc .insets = new Insets (0 , 5 , 20 , 5 );
98+ add (indicatorPanel , gbc );
99+
100+ // Reset gridwidth for other components
101+ gbc .gridwidth = 1 ;
102+ gbc .gridy ++;
103+
104+ // Load configuration
105+ config = SkidfuscatorConfig .load ();
54106
55107 // Input file
56108 gbc .gridx = 0 ; gbc .gridy = 0 ;
0 commit comments