Sunday, March 13, 2005

Writing the createToolBar method

Program

    void createToolBar() {
        JToolBar jToolBar1 = new JToolBar();
        jToolBar1.add(new JButton("jButton1"));
        jToolBar1.add(new JButton("jButton2"));
        jToolBar1.addSeparator();
        jToolBar1.add(new JButton("jButton3"));

        getContentPane().add(jToolBar1, BorderLayout.NORTH);
    }

No comments: