Skip to content

Commit 6b9aa10

Browse files
committed
Use the system look & feel for the GUI
1 parent 3242844 commit 6b9aa10

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/main/java/javancss/Javancss.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@
4646
import javancss.parser.JavaParserTokenManager;
4747
import javancss.parser.TokenMgrError;
4848

49+
import javax.swing.*;
50+
4951
/**
5052
* While the Java parser class might be the heart of JavaNCSS,
5153
* this class is the brain. This class controls input and output and
@@ -671,6 +673,14 @@ public Javancss( String[] args ) throws IOException
671673

672674
if ( cl.hasOption( "gui" ) )
673675
{
676+
try
677+
{
678+
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
679+
}
680+
catch ( Exception e )
681+
{
682+
}
683+
674684
JavancssFrame pJavancssFrame = new JavancssFrame( cl.getArgList() );
675685
/* final Thread pThread = Thread.currentThread(); */
676686
pJavancssFrame.addWindowListener( new WindowAdapter()

0 commit comments

Comments
 (0)