How to add a JComboBox to MainToolBar Permanently deleted user Created December 04, 2007 06:49 Hi,I would like to know how to add a JComboBox to MainToolBar?Thanks in advance.RegardsBoon Ping.
Hello Lan,
You need to create an action class extending ComboBoxAction, and add it to
the toolbar action group in the usual way.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Hi,
I just found the answer.
Extends AnAction and implements CustomerComponentAction.
E.g
public class MyComboBox extends AnAction implements CustomComponentAction
{
public void actionPerformed( AnActionEvent e )
{
}
public JComponent createCustomComponent( Presentation presentation )
{
JComboBox jComboBox = new JComboBox( new String[]{ "haha", "hehe" } );
return jComboBox;
}
}
Anyway thanks.
Regards
Boon Ping.