import java.awt.*;  
import java.awt.event.*;  
import javax.swing.*;   
import javax.swing.event.*;
  
public class ToolBar extends JFrame implements ActionListener 
{  
  		JToolBar Barra_de_Ferramentas = new JToolBar();
  		JButton bt_Novo, bt_Abrir, bt_Salvar, bt_Salvar_Como, bt_Sair;
  		JButton bt_Alinhamento_Esquerda, bt_Alinhamento_Direita, bt_Alinhamento_Justificado, bt_Alinhamento_Centralizado;
  		JTextArea ta_AreaDeTextos; 
  		JPanel Painel_Normal; 
  		JScrollPane Painel_Rolante; 
  		JMenuBar Barra_de_Menu = new JMenuBar();
  		JMenu Menu_Arquivo, Menu_Editar, Menu_Configuracoes, Menu_Ajuda;	
  					
    	public ToolBar() 
    	{  
 				setJMenuBar(Barra_de_Menu 			 = new JMenuBar());
 				Barra_de_Menu.add(Menu_Arquivo 		 = new JMenu("ARQUIVO"));
 				Barra_de_Menu.add(Menu_Editar 		 = new JMenu("EDITAR"));
 				Barra_de_Menu.add(Menu_Configuracoes = new JMenu("CONFIGURAÇÕES"));
 				Barra_de_Menu.add(Menu_Ajuda   		 = new JMenu("AJUDA"));
        		BorderLayout MeuBorderLayout         = new BorderLayout(); 
        		Painel_Normal = new JPanel();	
        		ta_AreaDeTextos = new JTextArea(8,40); 
        		Painel_Rolante = new JScrollPane(ta_AreaDeTextos); 	
        		Painel_Normal.setLayout(MeuBorderLayout);      			
        		Painel_Normal.add("North", Barra_de_Ferramentas);  
        		Painel_Normal.add("Center", Painel_Rolante);         			        			 
        		Barra_de_Ferramentas.add(bt_Novo                     = new JButton(new ImageIcon("novo.png")));
        		Barra_de_Ferramentas.add(bt_Abrir                    = new JButton(new ImageIcon("abrir.png")));
        		Barra_de_Ferramentas.add(bt_Salvar                   = new JButton(new ImageIcon("salvar.png")));
        		Barra_de_Ferramentas.add(bt_Salvar_Como              = new JButton(new ImageIcon("salvarcomo.png")));        		  
        		Barra_de_Ferramentas.add(bt_Alinhamento_Esquerda     = new JButton(new ImageIcon("alinhamento_esquerdo.png")));
        		Barra_de_Ferramentas.add(bt_Alinhamento_Direita      = new JButton(new ImageIcon("alinhamento_direito.png")));
        		Barra_de_Ferramentas.add(bt_Alinhamento_Justificado  = new JButton(new ImageIcon("alinhamento_justificado.png")));
        		Barra_de_Ferramentas.add(bt_Alinhamento_Centralizado = new JButton(new ImageIcon("alinhamento_centralizado.png")));  
        		Barra_de_Ferramentas.add(bt_Sair                     = new JButton(new ImageIcon("sair.png")));  
 	    		Barra_de_Ferramentas.addSeparator();
    
        		setSize(600, 800);
        		setVisible(true);  
        		setResizable(false);	
        		//////////////////////////////////////////////////
                bt_Novo.addActionListener(this);
                bt_Abrir.addActionListener(this);
                bt_Salvar.addActionListener(this);
                bt_Salvar_Como.addActionListener(this);
                bt_Sair.addActionListener(this);
  				bt_Alinhamento_Esquerda.addActionListener(this);
  				bt_Alinhamento_Direita.addActionListener(this);
  				bt_Alinhamento_Justificado.addActionListener(this);
  				bt_Alinhamento_Centralizado.addActionListener(this);	

  				//setContentPane(Painel_Normal);
  				getContentPane().add(Painel_Normal);
  				setTitle("OXNAR - PROCESSADOR DE TEXTOS");
  				setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  				  
    	}  
  		public static void main(String[] args) 
  		{  
        		 new ToolBar();   	
        }  
        public void actionPerformed(ActionEvent e)
        {
        	
        }		
} 