File tree Expand file tree Collapse file tree
src/main/java/the/bytecode/club/bytecodeviewer/gui/resourcelist Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,17 +43,20 @@ public ResourceTree(final DefaultMutableTreeNode treeRoot)
4343 StringMetricsUtil m = null ;
4444
4545 @ Override
46- public void paint (final Graphics g )
46+ public void paint (final Graphics graphics )
4747 {
4848 try
4949 {
50+ Graphics2D g = (Graphics2D ) graphics ;
5051 super .paint (g );
5152 if (m == null )
5253 {
53- m = new StringMetricsUtil (( Graphics2D ) g );
54+ m = new StringMetricsUtil (g );
5455 }
5556 if (treeRoot .getChildCount () < 1 )
5657 {
58+ g .setRenderingHint (RenderingHints .KEY_TEXT_ANTIALIASING ,
59+ RenderingHints .VALUE_TEXT_ANTIALIAS_ON );
5760 g .setColor (new Color (0 , 0 , 0 , 100 ));
5861 g .fillRect (0 , 0 , getWidth (), getHeight ());
5962 g .setColor (Color .white );
@@ -63,7 +66,7 @@ public void paint(final Graphics g)
6366 getHeight () / 2 );
6467 }
6568 }
66- catch (InternalError | NullPointerException ignored )
69+ catch (InternalError | NullPointerException | ClassCastException ignored )
6770 {
6871 }
6972 }
You can’t perform that action at this time.
0 commit comments