Ver Mensaje Individual
  #1 (permalink)  
Antiguo 17/10/2011, 19:55
Ursulo
 
Fecha de Ingreso: mayo-2010
Mensajes: 212
Antigüedad: 14 años, 9 meses
Puntos: 3
Uso de Variables

tengo el siguiente codigo,
Código PHP:
package isreiva;

import java.awt.Dimension;

import java.awt.Rectangle;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextField;
import java.util.Scanner;

public class 
Calculo extends JFrame {
    private 
JButton jButton1 = new JButton();
    private 
JLabel jLabel1 = new JLabel();
    private 
JTextField jTextField1 = new JTextField();
    private 
JLabel jLabel2 = new JLabel();

    public 
Calculo() {
        try {
            
jbInit();
        } catch (
Exception e) {
            
e.printStackTrace();
        }
    }

    private 
void jbInit() throws Exception {
        
        
this.getContentPane().setLayoutnull );
        
this.setSize( new Dimension(400300) );
        
jButton1.setText("Calcular");
        
jButton1.setBounds(new Rectangle(26519011040));
        
jButton1.addActionListener(new ActionListener() {
                public 
void actionPerformed(ActionEvent e) {
                    
jButton1_actionPerformed(e);
                }
            });
        
jLabel1.setText("Escriba sus honorarios en el campo: ");
        
jLabel1.setBounds(new Rectangle(652018040));
        
jTextField1.setBounds(new Rectangle(1006511530));
        
jLabel2.setText("");
        
jLabel2.setBounds(new Rectangle(12511510535));
        
this.getContentPane().add(jLabel2null);
        
this.getContentPane().add(jTextField1null);
        
this.getContentPane().add(jLabel1null);
        
this.getContentPane().add(jButton1null);
    }

    private 
void jButton1_actionPerformed(ActionEvent e) {
        
double Honorarios,Subtotal,IVA,ISR,RIVA,Total;
        
jTextField1.write(Honorarios);// aqui tengo un problema de tipo de dato incompatible
 
        
IVA Honorarios*.16;
        
Subtotal Honorarios IVA;
        
ISR Honorarios .1;
        
RIVA IVA * (2/3);
        
Total Subtotal - (ISR+RIVA);
    } 
Uso Write o getContentPane? lo que quiero es hacer un calculo de impuestos
__________________
Por favor dejenme Karmas