ToolBar in Java Program
ToolBar in Java Program
import javax.Swing.*;
import javax.awt.*;
public class create ToolBar
{
public Static void main(String[] args)
{
JFrame frame=new JFrame("Toolbar");
JToolBar toolbar=new JToolBar("ToolBar",JToolBar.HORIZONTAL);
JButton.cutbutton=new JButton(new ImageIcon("1.jpg"));
toolbar.add(cutbutton);
JButton pastebutton=new JButton(new ImageIcon("2.jpg"));
toolbar.add(paste button);
frame.getContentPane().add(toolbar,BorderLayout.NORTH);
frame.setUndercorated(true);
frame.setRootPane().setWindowDecorationStyle(JRootPane.PLAIN_DIALOG);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(100,100);
frame.setVisible(true);
}
}
0 coment�rios:
Post a Comment