/**
 * @(#)Text1.java
 *
 *
 * @author 
 * @version 1.00 2018/4/1
 */
import java.awt.*; 
import javax.swing.*; 
import java.text.AttributedCharacterIterator.Attribute;


public class OxnarCalculadora1 extends JFrame //implements ActionListener 
{
		JButton bt_0, bt_1, bt_2, bt_3, bt_4, bt_5, bt_6, bt_7, bt_8, bt_9 ;  
		JPanel Painel_Centro = new JPanel(new GridLayout (4, 3) );
		JPanel Painel_Norte = new JPanel(new GridLayout (2, 1));
		JPanel Painel_Norte1 = new JPanel();
		JPanel Painel_Leste = new JPanel(new GridLayout (4, 5) ); //Painel de Funções
		//Botoes
		Botao_Branco_Calculadora bt_Igual, bt_Mais, bt_Menos, bt_Dividir, bt_Multiplicar, bt_Fatorial, bt_1DivididoporN, bt_XelevadoY,  bt_Ponto, bt_Inversor, bt_Porce;
		Botao_Branco_Calculadora bt_Apagar, bt_Apagar_Tudo, bt_Resto, bt_RaizQuadrada, bt_RaizN, bt_Porcentagem, bt_Sair; 
		Botao_Branco_Calculadora bt_Seno, bt_Cosseno, bt_Tangente, bt_XaoQuadrado; 	
		
				
		JTextField tf_Display = new JTextField(); 
    	public OxnarCalculadora1() 
    	{
    			setLayout(new BorderLayout()); 
				getContentPane().add("North", Painel_Norte);
				Painel_Norte.add(Painel_Norte1);
				Painel_Norte.add(tf_Display);
				tf_Display.setFont(new Font("Arial",1, 19));
    			getContentPane().add("Center",Painel_Centro ); 
 				Painel_Centro.add(bt_9 = new JButton ("9")); 
    			Painel_Centro.add(bt_8 = new JButton ("8"));
   				Painel_Centro.add(bt_7 = new JButton ("7"));    					
   				Painel_Centro.add(bt_6 = new JButton ("6")); 			
 				Painel_Centro.add(bt_5 = new JButton ("5"));    					 			
    			Painel_Centro.add(bt_4 = new JButton ("4"));
 				Painel_Centro.add(bt_3 = new JButton ("3"));    					
    			Painel_Centro.add(bt_2 = new JButton ("2"));
 				Painel_Centro.add(bt_1 = new JButton ("1"));    					 			
    			Painel_Centro.add(bt_0 = new JButton ("0")); 					
    			Painel_Centro.add(bt_Ponto 			= new Botao_Branco_Calculadora ("."));
 				Painel_Centro.add(bt_Inversor 		= new Botao_Branco_Calculadora ("+/-"));    					
 				getContentPane().add("East", Painel_Leste);
 				Painel_Leste.add(bt_Apagar			= new Botao_Branco_Calculadora("C"));
 				Painel_Leste.add(bt_Apagar_Tudo		= new Botao_Branco_Calculadora("CE"));
 				Painel_Leste.add(bt_Porcentagem		= new Botao_Branco_Calculadora("%"));
 				Painel_Leste.add(bt_Sair 			= new Botao_Branco_Calculadora("SAIR"));
 				Painel_Leste.add(bt_RaizQuadrada 	= new Botao_Branco_Calculadora("SQRT"));
 				Painel_Leste.add(bt_RaizN			= new Botao_Branco_Calculadora("RAIZ N"));
 				Painel_Leste.add(bt_1DivididoporN	= new Botao_Branco_Calculadora("1/n"));
 				Painel_Leste.add(bt_Resto			= new Botao_Branco_Calculadora("RESTO"));
 				Painel_Leste.add(bt_Seno			= new Botao_Branco_Calculadora("SEN"));
 				Painel_Leste.add(bt_Cosseno			= new Botao_Branco_Calculadora("COS"));
 				Painel_Leste.add(bt_Tangente		= new Botao_Branco_Calculadora("TANG"));
 				
 				Painel_Leste.add(bt_XelevadoY		= new Botao_Branco_Calculadora("X^Y"));
 				Painel_Leste.add(bt_XaoQuadrado		= new Botao_Branco_Calculadora("X^2"));
 				Painel_Leste.add(bt_Fatorial		= new Botao_Branco_Calculadora("n!"));
    			Painel_Leste.add(bt_Dividir			= new Botao_Branco_Calculadora("/"));
 				Painel_Leste.add(bt_Multiplicar		= new Botao_Branco_Calculadora("*"));
 				Painel_Leste.add(bt_Menos			= new Botao_Branco_Calculadora("-"));
 				Painel_Leste.add(bt_Mais			= new Botao_Branco_Calculadora("+"));
 				Painel_Leste.add(bt_Igual			= new Botao_Branco_Calculadora("=")); 
 				/////////////////
 				bt_Igual.setBackground (Color.white); 
 				bt_Mais.setBackground (Color.white);
 				bt_Menos.setBackground (Color.white);
 				bt_Dividir.setBackground (Color.white);
 				bt_Multiplicar.setBackground (Color.white);
 				bt_Fatorial.setBackground (Color.white);
 				bt_1DivididoporN.setBackground (Color.white);
 				bt_XelevadoY.setBackground (Color.white);
 				/////////////////
    			pack();
    			setVisible(true);
    			setResizable(false); 
    			setTitle("OXNAR - CALCULADORA AVANÇADA");
    			this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    			
    	}
    	
    	public static void main (String args [])
    	{
    			new OxnarCalculadora1(); 
    	}	
    
    
}