I've changed it to JScrollPane now but becouse I don't load any big items on it it doesn't show scrolls... am I right ?
I am using it as a canvas to draw various shapes... but I would like to scroll it. Can I forse it to show scroll bars ?
here is my code:
public ApplicationFrame()
{
final int DEFAULT_FRAME_WIDTH = 450;
final int DEFAULT_FRAME_HIGHT = 450;
setSize(DEFAULT_FRAME_WIDTH, DEFAULT_FRAME_HIGHT);
Container contentPane = getContentPane();
contentPane.setLayout(new BorderLayout());
//Init of top/help panel
myHelpPanel = new HelpPanel();
contentPane.add(myHelpPanel, "North"

;
//init design area and add it to the container
myDesignArea = new DesignCanvas(this);
JScrollPane myScrollPane = new JScrollPane();
myScrollPane.getViewport().add(myDesignArea);
//drow canvas border.
Border compound = BorderFactory.createCompoundBorder(BorderFactory.createEmptyBorder(5,15,15,15), BorderFactory.createLineBorder(Color.black));
myScrollPane.setBorder(compound);
contentPane.add(myScrollPane, BorderLayout.CENTER);
//init tool bar and add it to the container
DesignToolBar myTools = new DesignToolBar(myDesignArea, myHelpPanel);
contentPane.add(myTools, "South"

;
//init of menu bar and add it to the container
JMenuBar menuBar = new JMenuBar();
setJMenuBar(menuBar);
//create menu item listener
MenuListener menuItemListener = new MenuListener();
//create file menu items and add them to the menu bar
JMenu fileMenu = new JMenu("File"

;