1

I am using JxTaskPane to add menu items ..but i don't want to use it, as i don't want that expand and collapsed type of container .. i just want to arrange my menu items horizontally.

If i add it to panel than i am unable to add actions to it as JxTaskPane has a method ..

public Component add(Action action) {
}

so what can i use here ..or if there is no other choice, can i remove that expand and collapsed button. and also... how to arrange the items horizontally in JxTaskPane.

Currently I am having a JScrollpane inside that is a JXTaskPaneContainer then inside JXTaskPaneContainer there is JxTaskPane .

Please help me..

Thankx

javanna
  • 59,145
  • 14
  • 144
  • 125
Tushar Agarwal
  • 521
  • 1
  • 16
  • 39

1 Answers1

0

If you can't use JMenuBar subclass JPanel and add a method

public void addAction(Action a) {
  addComponent( new JButton(a) );
}

That panel could use any layout manager you want, e.g. FlowLayout.

Thomas
  • 87,414
  • 12
  • 119
  • 157