JPanel panel1 = new JPanel();
// panel1.setBackground( new java.awt.Color( 235, 124, 25 ) );
panel1.setLayout( gridBag1 );
JTabbedPane tabbedPane = new JTabbedPane();
// tabbedPane.setLayout(new BorderLayout());
tabbedPane.addTab( DemoApp.getRes().getString( "Failure Detections" ), panel1 );
tabbedPane.setMnemonicAt( 0, KeyEvent.VK_1 );
buildCommand( panel1, gridBag1, c1, 1, DemoApp.getRes().getString( "Crash" ), "crash", DemoApp.getRes().getString( "Simulate a Application Crash" ) );
buildCommand( panel1, gridBag1, c1, 1, DemoApp.getRes().getString( "Out of Memory" ), "out_of_mem", DemoApp.getRes().getString( "Simulate a Out Of Memory Error" ) );
buildCommand( panel1, gridBag1, c1, 1, DemoApp.getRes().getString( "Frozen" ), "frozen", DemoApp.getRes().getString( "Simulate a Frozen JVM" ) );
buildCommand( panel1, gridBag1, c1, 2, DemoApp.getRes().getString( "Deadlock" ), "deadlock", DemoApp.getRes().getString( "Simulate a Thread Deadlock" ) );
JPanel panel2 = new JPanel();
panel2.setLayout( gridBag2 );
// panel2.setBackground( Color.yellow );
tabbedPane.addTab( DemoApp.getRes().getString( "Feature Demo" ), panel2 );
tabbedPane.setMnemonicAt( 1, KeyEvent.VK_2 );
buildCommand( panel2, gridBag2, c2, 3, DemoApp.getRes().getString( "Email" ), "mail", DemoApp.getRes().getString( "Activates the email functionality" ) );
buildCommand( panel2, gridBag2, c2, 3, DemoApp.getRes().getString( "WrapperExec" ), "exec", DemoApp.getRes().getString( "Creates a managed Child Process" ) );
String os = System.getProperty( "os.name" );
if ( os.indexOf( "Windows" ) >= 0 )
{
buildCommand( panel2, gridBag2, c2, 2, DemoApp.getRes().getString( "Customization" ), "customize", DemoApp.getRes().getString( "Creates a customized Binary of the wrapper" ) );
buildCommand( panel2, gridBag2, c2, 1, DemoApp.getRes().getString( "Service" ), "service", DemoApp.getRes().getString( "Installs and starts this app as Windows Service" ) );
}
else
{
buildCommand( panel2, gridBag2, c2, 1, DemoApp.getRes().getString( "Daemon" ), "daemon", DemoApp.getRes().getString( "Installs and starts this app as Daemon" ) );
}
m_logTextArea = new JEditorPane();
jEditorPane2 = new JEditorPane();
m_logTextArea.setContentType( "text/html;" );
jEditorPane2.setContentType( "text/html; charset=UTF-8" );
jEditorPane2.setEditable( false );
// Set CSS format rule
Font font = UIManager.getFont( "Label.font" );
String bodyRule = "body { font-family: " + font.getFamily() + "; " + "font-size: 14pt; }";
( ( HTMLDocument )jEditorPane2.getDocument() ).getStyleSheet().addRule( bodyRule );
m_logTextArea.setEditable( false );
//setMinimumSize( new java.awt.Dimension( 699, 300 ) );
jTabbedPane2 = new javax.swing.JTabbedPane();
m_logPane = new JScrollPane( m_logTextArea );
jScrollPane2 = new JScrollPane( jEditorPane2 );
//jTabbedPane2.setPreferredSize( new Dimension( this.getMinimumSize().width, 400 ) );
jTabbedPane2.setPreferredSize(new java.awt.Dimension(800, 400));
jTabbedPane2.addTab( DemoApp.getRes().getString( "Description" ), jScrollPane2 );
jTabbedPane2.addTab( DemoApp.getRes().getString( "Wrapper Output" ), m_logPane );
getContentPane().setLayout( new BorderLayout() );
getContentPane().add( tabbedPane, java.awt.BorderLayout.PAGE_START );
getContentPane().add( jTabbedPane2, java.awt.BorderLayout.CENTER );
this.setVisible( true );
this.pack();
tabbedPane.setMaximumSize( new Dimension( tabbedPane.getMaximumSize().width, tabbedPane.getSize().height ) );
}