@ -13,9 +13,6 @@ import java.awt.event.ActionListener;
 
			
		
	
		
		
			
				
					
					import  java.awt.event.ItemEvent ; import  java.awt.event.ItemEvent ;  
			
		
	
		
		
			
				
					
					import  java.awt.event.ItemListener ; import  java.awt.event.ItemListener ;  
			
		
	
		
		
			
				
					
					import  java.io.File ; import  java.io.File ;  
			
		
	
		
		
			
				
					
					import  java.io.FileInputStream ;  
			
		
	
		
		
			
				
					
					import  java.io.FileNotFoundException ;  
			
		
	
		
		
			
				
					
					import  java.io.IOException ;  
			
		
	
		
		
			
				
					
					import  java.util.Arrays ; import  java.util.Arrays ;  
			
		
	
		
		
			
				
					
					import  java.util.Comparator ; import  java.util.Comparator ;  
			
		
	
		
		
			
				
					
					import  java.util.LinkedList ; import  java.util.LinkedList ;  
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -29,7 +26,6 @@ import javax.swing.JButton;
 
			
		
	
		
		
			
				
					
					import  javax.swing.JComboBox ; import  javax.swing.JComboBox ;  
			
		
	
		
		
			
				
					
					import  javax.swing.JFrame ; import  javax.swing.JFrame ;  
			
		
	
		
		
			
				
					
					import  javax.swing.JLabel ; import  javax.swing.JLabel ;  
			
		
	
		
		
			
				
					
					import  javax.swing.JOptionPane ;  
			
		
	
		
		
			
				
					
					import  javax.swing.JPanel ; import  javax.swing.JPanel ;  
			
		
	
		
		
			
				
					
					import  javax.swing.JScrollPane ; import  javax.swing.JScrollPane ;  
			
		
	
		
		
			
				
					
					import  javax.swing.JTextField ; import  javax.swing.JTextField ;  
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -47,7 +43,6 @@ import com.evolute.utils.images.ImageIconLoader;
 
			
		
	
		
		
			
				
					
					import  com.evolute.utils.tables.BaseTable ; import  com.evolute.utils.tables.BaseTable ;  
			
		
	
		
		
			
				
					
					import  com.evolute.utils.tables.VectorTableModel ; import  com.evolute.utils.tables.VectorTableModel ;  
			
		
	
		
		
			
				
					
					import  com.evolute.utils.ui.CustomJDialog ; import  com.evolute.utils.ui.CustomJDialog ;  
			
		
	
		
		
			
				
					
					import  com.evolute.utils.ui.DialogException ;  
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					public  class  MailDialog  extends  CustomJDialog public  class  MailDialog  extends  CustomJDialog  
			
		
	
		
		
			
				
					
					{ {  
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -69,48 +64,50 @@ public class MailDialog extends CustomJDialog
 
			
		
	
		
		
			
				
					
						
	
 
			
		
	
		
		
			
				
					
						protected  Action  removeAttachmentAction ; 
	protected  Action  removeAttachmentAction ; 
 
			
		
	
		
		
			
				
					
						
	
 
			
		
	
		
		
			
				
					
						public  static  void  main (  String  args [ ]  ) 
	private  boolean  sent  =  false ; 
 
			
				
				
			
		
	
		
		
			
				
					
							throws  Exception 
//	
  
			
				
				
			
		
	
		
		
			
				
					
						{ 
//	public static void main( String args[] )
  
			
				
				
			
		
	
		
		
			
				
					
							MailDialog  mailDialog  =  new  MailDialog (  null  ) ; 
//		throws Exception
  
			
				
				
			
		
	
		
		
			
				
					
							mailDialog . setTo (  "fredPalma@netcabo.pt"  ) ; 
//	{
  
			
				
				
			
		
	
		
		
			
				
					
							mailDialog . setBcc (  "fpalma@evolute.pt"  ) ; 
//		MailDialog mailDialog = new MailDialog( null );
  
			
				
				
			
		
	
		
		
			
				
					
							mailDialog . setSubject (  "SIPRP - Marca\u00E7\u00E3o de consulta de 'Frederico Palma'"  ) ; 
//		mailDialog.setTo( "fredPalma@netcabo.pt" );
  
			
				
				
			
		
	
		
		
			
				
					
							mailDialog . setMessage ( 
//		mailDialog.setBcc( "fpalma@evolute.pt" );
  
			
				
				
			
		
	
		
		
			
				
					
									"<p>" 
//		mailDialog.setSubject( "SIPRP - Marca\u00E7\u00E3o de consulta de 'Frederico Palma'" );
  
			
				
				
			
		
	
		
		
			
				
					
									+  "<font size=\"3\" face=\"Arial\">Vimos pelo presente informar que 'Frederico Palma' deverá comparecer " 
//		mailDialog.setMessage(
  
			
				
				
			
		
	
		
		
			
				
					
									+  "nas nossas instalações para a realização da consulta de Medicina " 
//				"<p>"
  
			
				
				
			
		
	
		
		
			
				
					
									+  "do Trabalho, no dia '<b>10-01-2008</b>', pelas <b>08H30</b>. </font>" 
//				+ "<font size=\"3\" face=\"Arial\">Vimos pelo presente informar que 'Frederico Palma' deverá comparecer "
  
			
				
				
			
		
	
		
		
			
				
					
									+  "</p>" 
//				+ "nas nossas instalações para a realização da consulta de Medicina "
  
			
				
				
			
		
	
		
		
			
				
					
									+  "<p>" 
//				+ "do Trabalho, no dia '<b>10-01-2008</b>', pelas <b>08H30</b>. </font>"
  
			
				
				
			
		
	
		
		
			
				
					
									+  "<font size=\"3\" face=\"Arial\">Solicitamos, também, que o colaborador seja portador do <b>Boletim de Vacinas</b> e " 
//				+ "</p>"
  
			
				
				
			
		
	
		
		
			
				
					
									+  "dos <b>últimos exames complementares</b> realizados.</font>" 
//				+ "<p>"
  
			
				
				
			
		
	
		
		
			
				
					
									+  "</p>" 
//				+ "<font size=\"3\" face=\"Arial\">Solicitamos, também, que o colaborador seja portador do <b>Boletim de Vacinas</b> e "
  
			
				
				
			
		
	
		
		
			
				
					
									+  "<p>" 
//				+ "dos <b>últimos exames complementares</b> realizados.</font>"
  
			
				
				
			
		
	
		
		
			
				
					
									+  "<font size=\"3\" face=\"Arial\">Caso não seja possível a comparência deste colaborador na data " 
//				+ "</p>"
  
			
				
				
			
		
	
		
		
			
				
					
									+  "indicada, contacte-nos, por favor, através do telefone 21 350 45 40 " 
//				+ "<p>"
  
			
				
				
			
		
	
		
		
			
				
					
									+  "ou respondendo ao remetente desta mensagem.</font>" 
//				+ "<font size=\"3\" face=\"Arial\">Caso não seja possível a comparência deste colaborador na data "
  
			
				
				
			
		
	
		
		
			
				
					
									+  "</p><p></p>" 
//				+ "indicada, contacte-nos, por favor, através do telefone 21 350 45 40 "
  
			
				
				
			
		
	
		
		
			
				
					
									+  "<p>" 
//				+ "ou respondendo ao remetente desta mensagem.</font>"
  
			
				
				
			
		
	
		
		
			
				
					
									+  "<font size=\"3\" face=\"Arial\">Cumprimentos,</font>" 
//				+ "</p><p></p>"
  
			
				
				
			
		
	
		
		
			
				
					
									+  "</p>" 
//				+ "<p>"
  
			
				
				
			
		
	
		
		
			
				
					
									+  "<p>" 
//				+ "<font size=\"3\" face=\"Arial\">Cumprimentos,</font>"
  
			
				
				
			
		
	
		
		
			
				
					
									+  "<font size=\"3\" face=\"Arial\">SIPRP</font>" 
//				+ "</p>"
  
			
				
				
			
		
	
		
		
			
				
					
					//				color=\"#497895\"
 //				+ "<p>"
  
			
				
				
			
		
	
		
		
			
				
					
									+  "</p>" 
//				+ "<font size=\"3\" face=\"Arial\">SIPRP</font>"
  
			
				
				
			
		
	
		
		
			
				
					
									+  "<p>" 
////				color=\"#497895\"
  
			
				
				
			
		
	
		
		
			
				
					
									+  "<font size=\"3\" face=\"Arial\">ATRIUM SALDANHA</font>" 
//				+ "</p>"
  
			
				
				
			
		
	
		
		
			
				
					
									+  "</p>" 
//				+ "<p>"
  
			
				
				
			
		
	
		
		
			
				
					
									+  "<p>" 
//				+ "<font size=\"3\" face=\"Arial\">ATRIUM SALDANHA</font>"
  
			
				
				
			
		
	
		
		
			
				
					
									+  "<font size=\"3\" face=\"Arial\">Praça Duque de Saldanha, 1 - 9ºG</font>" 
//				+ "</p>"
  
			
				
				
			
		
	
		
		
			
				
					
									+  "</p>" 
//				+ "<p>"
  
			
				
				
			
		
	
		
		
			
				
					
									+  "<p>" 
//				+ "<font size=\"3\" face=\"Arial\">Praça Duque de Saldanha, 1 - 9ºG</font>"
  
			
				
				
			
		
	
		
		
			
				
					
									+  "<font size=\"3\" face=\"Arial\">1050-094 Lisboa" 
//				+ "</p>"
  
			
				
				
			
		
	
		
		
			
				
					
									+  "</p>"  ) ; 
//				+ "<p>"
  
			
				
				
			
		
	
		
		
			
				
					
							mailDialog . setSize (  1024 ,  768  ) ; 
//				+ "<font size=\"3\" face=\"Arial\">1050-094 Lisboa"
  
			
				
				
			
		
	
		
		
			
				
					
							mailDialog . setVisible (  true  ) ; 
//				+ "</p>" );
  
			
				
				
			
		
	
		
		
			
				
					
							System . exit (  0  ) ; 
//		mailDialog.setSize( 1024, 768 );
  
			
				
				
			
		
	
		
		
			
				
					
						} 
//		mailDialog.setVisible( true );
  
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					//		System.exit( 0 );
  
			
		
	
		
		
			
				
					
					//	}
  
			
		
	
		
		
			
				
					
						
	
 
			
		
	
		
		
			
				
					
						public  MailDialog (  JFrame  owner ,  String  to ,  String  bcc ,  String  subject ,  String  message ,  Vector < File >  files ) 
	public  MailDialog (  JFrame  owner ,  String  to ,  String  bcc ,  String  subject ,  String  message ,  Vector < File >  files ) 
 
			
		
	
		
		
			
				
					
						throws  Exception 
	throws  Exception 
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -128,16 +125,16 @@ public class MailDialog extends CustomJDialog
 
			
		
	
		
		
			
				
					
							setVisible (  true  ) ; 
		setVisible (  true  ) ; 
 
			
		
	
		
		
			
				
					
						} 
	} 
 
			
		
	
		
		
			
				
					
						
	
 
			
		
	
		
		
			
				
					
						
// 
  
			
				
				
			
		
	
		
		
			
				
					
							
// 
  
			
				
				
			
		
	
		
		
			
				
					
						
// 
  
			
				
				
			
		
	
		
		
			
				
					
							
// 
  
			
				
				
			
		
	
		
		
			
				
					
							
// 
  
			
				
				
			
		
	
		
		
			
				
					
							
// 
  
			
				
				
			
		
	
		
		
			
				
					
							
// 
  
			
				
				
			
		
	
		
		
			
				
					
							
// 
  
			
				
				
			
		
	
		
		
			
				
					
							
// 
  
			
				
				
			
		
	
		
		
			
				
					
						
// 
  
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
						
	
 
			
		
	
		
		
			
				
					
						private  void  commonStartup ( ) 
	private  void  commonStartup ( ) 
 
			
		
	
		
		
			
				
					
						throws  Exception 
	throws  Exception 
 
			
		
	
	
		
		
			
				
					
						
							
								 
						
						
							
								 
						
						
					 
					@ -581,6 +578,7 @@ public class MailDialog extends CustomJDialog
 
			
		
	
		
		
			
				
					
							try 
		try 
 
			
		
	
		
		
			
				
					
							{ 
		{ 
 
			
		
	
		
		
			
				
					
								sender . send (  to ,  bcc ,  subject ,  body ,  attachmentList ,  attachments  ) ; 
			sender . send (  to ,  bcc ,  subject ,  body ,  attachmentList ,  attachments  ) ; 
 
			
		
	
		
		
			
				
					
								sent  =  true ; 
 
			
		
	
		
		
			
				
					
							} 
		} 
 
			
		
	
		
		
			
				
					
							catch (  Exception  ex  ) 
		catch (  Exception  ex  ) 
 
			
		
	
		
		
			
				
					
							{ 
		{ 
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -588,6 +586,11 @@ public class MailDialog extends CustomJDialog
 
			
		
	
		
		
			
				
					
							} 
		} 
 
			
		
	
		
		
			
				
					
						} 
	} 
 
			
		
	
		
		
			
				
					
						
	
 
			
		
	
		
		
			
				
					
						public  boolean  wasSent ( ) 
 
			
		
	
		
		
			
				
					
						{ 
 
			
		
	
		
		
			
				
					
							return  sent ; 
 
			
		
	
		
		
			
				
					
						} 
 
			
		
	
		
		
			
				
					
						
 
			
		
	
		
		
			
				
					
						public  void  close ( ) 
	public  void  close ( ) 
 
			
		
	
		
		
			
				
					
						{ 
	{ 
 
			
		
	
		
		
			
				
					
							SwingUtilities . invokeLater (  new  Runnable ( ) { 
		SwingUtilities . invokeLater (  new  Runnable ( ) {