File tree Expand file tree Collapse file tree 3 files changed +19
-1
lines changed
src/main/java/club/bytecode/the/jda Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 1010import club .bytecode .the .jda .gui .fileviewer .ViewerFile ;
1111import club .bytecode .the .jda .gui .navigation .FileNavigationPane ;
1212import club .bytecode .the .jda .settings .Settings ;
13+ import club .bytecode .the .jda .util .GuiUtils ;
14+ import club .bytecode .the .jda .util .MiscUtils ;
1315import org .apache .commons .io .FileUtils ;
1416import org .fife .ui .rsyntaxtextarea .AbstractTokenMakerFactory ;
1517import org .fife .ui .rsyntaxtextarea .TokenMakerFactory ;
@@ -59,6 +61,10 @@ public class JDA {
5961 */
6062 public static void main (String [] args ) {
6163 try {
64+ // Fix antialiasing
65+ System .setProperty ("awt.useSystemAAFontSettings" , "lcd" );
66+ System .setProperty ("swing.aatext" , "true" );
67+ GuiUtils .setWmClassName ("JDA" );
6268 UIManager .setLookAndFeel (UIManager .getSystemLookAndFeelClassName ());
6369 } catch (Exception e ) {
6470 new ExceptionUI (e );
Original file line number Diff line number Diff line change 1+ package club .bytecode .the .jda .util ;
2+
3+ import java .awt .*;
4+
5+ public class GuiUtils {
6+ public static void setWmClassName (String className ) throws NoSuchFieldException , IllegalAccessException {
7+ Toolkit xToolkit = Toolkit .getDefaultToolkit ();
8+ java .lang .reflect .Field awtAppClassNameField = xToolkit .getClass ().getDeclaredField ("awtAppClassName" );
9+ awtAppClassNameField .setAccessible (true );
10+ awtAppClassNameField .set (xToolkit , className );
11+ }
12+ }
Original file line number Diff line number Diff line change 1- package club .bytecode .the .jda ;
1+ package club .bytecode .the .jda . util ;
22
33import java .io .BufferedReader ;
44import java .io .File ;
You can’t perform that action at this time.
0 commit comments