1. int diai= 0, añoi= 0, mesi =0;
  2.  
  3. if (aa>objF.getAño()){
  4. añoi = aa-objF.getAño();
  5. } else {
  6. if (aa== objF.getAño()){
  7. añoi = 0;
  8. }
  9. }
  10. if (ma>objF.getMes()){
  11. mesi = ma-objF.getMes();
  12. } else {
  13. if (ma== objF.getDia()){
  14. diai = 0;
  15. } else {
  16. if (ma< objF.getMes() ){
  17. mesi = (ma+objF.getMes());
  18. }
  19. }
  20. }
  21.  
  22. if (da>objF.getDia()){
  23. diai = da-objF.getDia();
  24. } else {
  25. if (da== objF.getDia())
  26. diai = 0;
  27. } if ( da< objF.getDia() ){
  28. mesi= ma+objF.getDia();
  29. }
  30. JOptionPane.showMessageDialog(null, "su antiguedad es "+añoi+"/años "+mesi+" /meses " + diai+"/dias");