private JButton getNewSessionButton ( ) { if ( newSessionButton == null ) { newSessionButton = new JButton ( ) ; newSessionButton . setText ( Constant . messages . getString ( "httpsessions.toolbar.newsession.label" ) ) ; newSessionButton . setIcon ( DisplayUtils . getScaledIcon ( new ImageIcon ( HttpSessionsPanel . class . getResource ( "/resource/icon/16/103.png" ) ) ) ) ; newSessionButton . setToolTipText ( Constant . messages . getString ( "httpsessions.toolbar.newsession.tooltip" ) ) ; newSessionButton . addActionListener ( new ActionListener ( ) { @ Override public void actionPerformed ( ActionEvent e ) { HttpSessionsSite site = getCurrentHttpSessionSite ( ) ; if ( site != null ) { site . createEmptySession ( ) ; } } } ) ; } return newSessionButton ; }
Gets the new session button .