question: private void createToolBar ( ) { toolBar = new JToolBar ( "TDA Toolbar" ) ; if ( listener . runningAsJConsolePlugin || listener . runningAsVisualVMPlugin ) { toolBar . add ( createToolBarButton ( "Request a Thread Dump" , "FileOpen.png" ) ) ; toolBar . setFloatable ( false ) ; } else { toolBar . add ( createToolBarButton ( "Open Logfile" , "FileOpen.png" ) ) ; closeToolBarButton = createToolBarButton ( "Close selected Logfile" , "CloseFile.png" ) ; closeToolBarButton . setEnabled ( false ) ; toolBar . add ( closeToolBarButton ) ; } toolBar . addSeparator ( ) ; toolBar . add ( createToolBarButton ( "Preferences" , "Preferences.png" ) ) ; toolBar . addSeparator ( ) ; expandButton = createToolBarButton ( "Expand all nodes" , "Expanded.png" ) ; expandButton . setEnabled ( false ) ; toolBar . add ( expandButton ) ; collapseButton = createToolBarButton ( "Collapse all nodes" , "Collapsed.png" ) ; collapseButton . setEnabled ( false ) ; toolBar . add ( collapseButton ) ; toolBar . addSeparator ( ) ; findLRThreadsButton = createToolBarButton ( "Find long running threads" , "FindLRThreads.png" ) ; findLRThreadsButton . setEnabled ( false ) ; toolBar . add ( findLRThreadsButton ) ; toolBar . add ( createToolBarButton ( "Filters" , "Filters.png" ) ) ; toolBar . add ( createToolBarButton ( "Custom Categories" , "CustomCat.png" ) ) ; toolBar . addSeparator ( ) ; }
target:  create a toolbar showing the most important main menu entries.