//IMPLEMENTACION FRAME PRINCIPAL: Asignador.java import java.awt.*; import javax.swing.*; import java.util.Date; import java.util.Calendar; import java.text.SimpleDateFormat; import java.text.DateFormat; import java.awt.event.*; import java.util.Vector; import java.util.Properties; import java.io.*; public class Asignador extends JFrame implements ActionListener { int max, A1, A2, num_mes, K, n, dia_num; Timer THora; Timer TC; JButton Bdia[], Btmp; Vector vBdia; SimpleDateFormat hora; Properties P_eventos; FileInputStream in; String S_hora, S_fecha, S_evento, S_dia_num, S_MY; String S_dia, S_dia_365, S_num_mes, S_resto; String S_A, S_K; String S_Ventana; String[] nombre_dia = { "Lunes", "Martes", "Miercoles", "Jueves", "Viernes", "Sabado", "Domingo" }; JLabel MY_label = new JLabel(); JLabel dia_label = new JLabel(); JLabel fecha_label = new JLabel(); JLabel hora_label = new JLabel(); JLabel dia_365_label = new JLabel(); JLabel resto_label = new JLabel(); JPanel PanelBotonesMain; JPanel PanelMain1; JPanel PanelMain2; Calendar here; MouseAdapter Brewind_MA; MouseAdapter Bforward_MA; MouseAdapter Bdia_MA; MouseAdapter BAbout_MA; MouseAdapter BOK_about_MA; JFrame frame_about; //%%%%%%%%%%%%%%%%%%%%%%%%%%%CONSTRUCTOR ORGANIZER%%%%%%%%%%%%%%%%%%%%%%%%%% public Asignador(Calendar here_constructor) { //Do frame stuff. super("Asignador v1.0 - by lospri"); //se setea el titulo del frame here = here_constructor; THora = new Timer(1000, this); //Timer(int delay, ActionListeber listener), delay en milisegundos THora.start(); //inicia el reloj enviando un action event al listener //INICIACION CALENDARIO init_calendario(here); //INICIACION FRAME PRINCIPAL(DIBUJOS) Y PROPERTIE init_graf(here); //LISTENER PARA CERRAR EL PROGRAMA CON BOTON X addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); } }); } //%%%%%%%%%%%%%%%%%%%%%%%END CONSTRUCTOR ORGANIZER%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%INIT_CALENDARIO%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% public void init_calendario(Calendar here_init_calendario) { Calendar here2 = here_init_calendario; here2.set( here2.get(here2.YEAR), here2.get(here2.MONTH), here2.get(here2.DAY_OF_MONTH)); //seteando el caslendario //FORMATO DE FECHAS, HORAS Y DIAS SimpleDateFormat MY = new SimpleDateFormat("MMMMMMMMMM yyyy"); SimpleDateFormat fecha = new SimpleDateFormat("dd.MM.yy"); SimpleDateFormat hora = new SimpleDateFormat("hh:mm:ss a"); SimpleDateFormat sdf_dia = new SimpleDateFormat("EEEEEEEEE"); //dia de la semana SimpleDateFormat sdf_dia_365 = new SimpleDateFormat("D"); SimpleDateFormat sdf_A = new SimpleDateFormat("yyyy"); SimpleDateFormat sdf_num_mes = new SimpleDateFormat("M"); SimpleDateFormat sdf_dia_num = new SimpleDateFormat("dd"); SimpleDateFormat sdf_evento = new SimpleDateFormat("MM.yy"); //SETEO DE DATE DE ACUERDO AL CALENDARIO Date MyDate = new Date(); MyDate = here2.getTime(); // entrega una variable del tipo Date del tiempo actual del calenfario here2 //CONVERSION SimpleDateFormat => String S_MY = MY.format(MyDate); S_A = sdf_A.format(MyDate); S_fecha = fecha.format(MyDate); S_hora = hora.format(MyDate); S_dia = sdf_dia.format(MyDate); S_dia_365 = sdf_dia_365.format(MyDate); S_num_mes = sdf_num_mes.format(MyDate); S_dia_num = sdf_dia_num.format(MyDate); S_evento = sdf_evento.format(MyDate); //UPPERCASE NOMBRE DE DIA S_dia = S_dia.toUpperCase(); //-----------------------EXISTEN AÑOS BISIESTOS...---------------------- //ESTO ES PARA MOSTRAR [PAST DAYS OF YEAR/DAYS LEFT TO END YEAR] int dia_365 = Integer.parseInt(S_dia_365); num_mes = Integer.parseInt(S_num_mes); A1 = Integer.parseInt(S_A); A2 = A1; int resto = 0; if ((A1 % 4) == 0) { A2 = 366; } else { A2 = 365; } resto = A2 - dia_365; //STRING [ dia Nº / 365 ] S_dia_365 = "[ ".concat(S_dia_365).concat(" / ").concat( Integer.toString(A2)).concat( " ]"); //STRING [dias que han pasado /dias restantes para que termine el año] S_resto = "[ " .concat(Integer.toString(dia_365 - 1)) .concat(" / ") .concat(Integer.toString(resto)) .concat(" ]"); //--------------------END EXISTEN AÑOS BISIESTOS...--------------------- } //%%%%%%%%%%%%%%%%%%%%%%%%%%%%END INIT_CALENDARIO%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%INIT_GRAF%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //FUNCION DE INICIACION DE GRAFICOS Y PROPERTIE public void init_graf(Calendar here_init_graf) { //---------------------CONFIGURACION DE LA VENTANA---------------------- //LAYOUT FRAME PRINCIPAL getContentPane().setLayout(null); //COLOR DE FONDO DEL FRAME getContentPane().setBackground(Color.orange); //fondo principal //PANELMAIN1 ALMACENA LOS BOTONES CON LOS NUMEROS DE LOS DIAS DEL MES PanelMain1 = new JPanel(); PanelMain1.setLayout(new GridLayout(6, 7)); //se setean los dias del mes , en forma de matrices y cada uno pueden ser botones PanelMain1.setBorder( new javax.swing.border.MatteBorder( new Insets(0, 0, 0, 0), Color.black)); //matte: no brillante, i se setea el borde del calendario(tamaño y color) PanelMain1.setBackground(Color.white); //fondo calendario(no se ve casi nada) //PANEL QUE ALMACENA LOS NOMBRES DE TODOS LOS DIAS: LUNES,..,DOMINGO PanelMain2 = new JPanel(); PanelMain2.setLayout(new GridLayout(1, 7)); PanelMain2.setBorder( new javax.swing.border.MatteBorder( new Insets(1, 1, 1, 1), new Color(0, 0, 0))); PanelMain2.setBackground(Color.black); //PROPERTIE PARA GUARDAR Y LEER DE ARCHIVO BD P_eventos = new Properties(); //SE CREA ARREGLO DE BOTONES. CONCEPTUAL: NO CONTIENE OBJETOS!! Bdia = new JButton[42]; //ESTA FUNCION DIBUJA: HOJA DE CALENDARIO Y BOTONES //CORRESPONDIENTES A CADA DIA, ETIQUETAS PARA EL DIA //FECHA, HORA, [DIA DEL YEAR/365] Y DIAS [PASADOS/DIAS RESTANTES] PanelMain(here_init_graf); //SE AGREGAN LOS BOTONES << y >> A LA VENTANA PRINCIPAL Botones_main(); //CONFIGURACION DE LA VENTANA PRINCIPAL pack(); //ajusta el tamaño de la vebtana antes de estrablecerla con setPre Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); setSize(new Dimension(635, 355)); setLocation( (screenSize.width - 650) / 2, (screenSize.height - 352) / 2); setResizable(false); //------------------END CONFIGURACION DE LA VENTANA--------------------- } //%%%%%%%%%%%%%%%%%%%%%%%%%%%END INIT_GRAPH%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%PANELMAIN%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% public void PanelMain(Calendar PanelMain_here) { //CONFIGURACION FORMATO DE ETIQUETAS (LABEL'S) //Y POSTERIOR DESPLIEGE EN EL FRAME PRINCIPAL FormatoLabel1(S_MY, MY_label); FormatoLabel2(S_dia, dia_label, 60); FormatoLabel2(S_fecha, fecha_label, 80); fecha_label.setToolTipText("Día.Mes.Año"); FormatoLabel2(S_hora, hora_label, 100); FormatoLabel2(S_dia_365, dia_365_label, 140); dia_365_label.setToolTipText( "[ Número de día en el año / Dias totales del año: " + A2 + " ]"); FormatoLabel2(S_resto, resto_label, 160); resto_label.setToolTipText( "[ Número de días que han pasado / Días restantes para que termine el año ]"); dia_num = Integer.parseInt(S_dia_num); max = PanelMain_here.getActualMaximum(PanelMain_here.DAY_OF_MONTH); //POS1 CORRESPONDE AL PRIMER DIA DEL MES (JUEVES, LUNES, ETC.) //1: DOMINGO, 2:LUNES,...., 7:SABADO. ESQUEMA ESTADOUNIDENSE. int pos1 = primera_pos(A1, num_mes, PanelMain_here); K = 1; pos1--; //------INICIACION DEL ARCHIVO CORRESPONDIENTE A LA FECHA CLICKEADA------ try { //NOMBRE DE ARCHIVO: YEAR NUMBER.BD in = new FileInputStream(S_A + ".bd"); //LA PROPERTIE CARGA EL ARCHIVO P_eventos.load(in); } catch (FileNotFoundException e) { } catch (IOException e) { } //----END INICIACION DEL ARCHIVO CORRESPONDIENTE A LA FECHA CLICKEADA---- //-----SE CREAN LOS 42 BOTONES: CALENDARIO ESQUEMA: LUNES -> DOMINGO----- for (int i = 0; i < 42; i++) { //EN CADA BLOQUE DEL ARREGLO, CREAMOS Y GUARDAMOS UN OBJETO Bdia[i] = new JButton(); Bdia[i].setBackground(Color.white); //color del fondo de los dias Bdia[i].setBorder( new javax.swing.border.MatteBorder( new Insets(1, 1, 1, 1), new Color(0, 0, 0))); Bdia[i].disable(); //BOTONES QUE SERAN ACTIVADOS Y ROTULADOS CON UN NUMERO if ((i >= pos1) && (K < max + 1)) { Bdia[i].enable(); Bdia[i].setText("" + K); //CREACION DE STRING DE ACUERDO AL BOTON QUE SE VA A CLICKEAR S_K = Integer.toString(K); if (K < 10) S_K = "0".concat(S_K); S_K = S_K.concat(".").concat(S_evento); //ESTE IF MARCA EL DIA ACTUAL if (K == dia_num) { Bdia[i].setBackground(Color.yellow); } //ESTE IF MARCA LA FECHA DE OTRO COLOR, //INDICANDO UN EVENTO PARA ESE DIA try { if (P_eventos.getProperty(S_K).length() != 0) { Bdia[i].setForeground(Color.red); } else { Bdia[i].setForeground(new Color(0, 0, 0)); } } catch (NullPointerException null_e) { } Bdia[i].setFont(new Font("Papyrus", 0, 16)); n = K; K++; Bdia_MA = new MouseAdapter() { int n1 = n; public void mousePressed(MouseEvent evt) { Ventana(evt, n1); } }; Bdia[i].addMouseListener(Bdia_MA); } //END if((i >= pos1)&&(K < max+1)) PanelMain1.add(Bdia[i]); } //END FOR for (int k = 0; k < 7; k++) { JLabel PanelMain2_Label = new JLabel(); PanelMain2_Label.setText(" " + nombre_dia[k]); PanelMain2_Label.setFont(new Font("Papyrus", 0, 10)); PanelMain2_Label.setForeground(Color.orange); PanelMain2.add(PanelMain2_Label); } //END FOR //-----------------------END LABEL PanelMain2_Label--------------------- //----------------------------PANEL'S----------------------------------- PanelMain1.setBounds(10, 60, 490, 264); getContentPane().add(PanelMain1); getContentPane().add(PanelMain2); PanelMain2.setBounds(10, 40, 490, 20); //----------------------------END PANEL'S------------------------------- } //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%END PANELMAIN%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%CLEAR PANELMAIN%%%%%%%%%%%%%%%%%%%%%%%%%%%% public void clear_PanelMain1() { P_eventos.clear(); PanelMain1.removeAll(); PanelMain2.removeAll(); } //%%%%%%%%%%%%%%%%%%%%%%%%%%%%END CLEAR PANELMAIN%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%POSICION DEL PRIMER DIA DEL MES%%%%%%%%%%%%%%%%%%%%%%% public int primera_pos(int tmp_year, int tmp_month, Calendar C_tmp) { tmp_month--; C_tmp.set(tmp_year, tmp_month, 1); int day_of_week_tmp = C_tmp.get(C_tmp.DAY_OF_WEEK); if (day_of_week_tmp != 1) { day_of_week_tmp--; } else { day_of_week_tmp = 7; } return day_of_week_tmp; } //%%%%%%%%%%%%%%%%%%%%POSICION DEL PRIMER DIA DEL MES%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%FormatoLabel1: MES - AÑO%%%%%%%%%%%%%%%%%%%%%%%%%%%%% public void FormatoLabel1(String S_tmp1, JLabel tmp1) { S_tmp1 = S_tmp1.toUpperCase(); tmp1.setText(S_tmp1); tmp1.setFont(new Font("Papyrus", Font.BOLD, 18)); tmp1.setBorder( new javax.swing.border.MatteBorder( new Insets(1, 1, 1, 1), Color.orange)); tmp1.setForeground(Color.black); //tmp1.setBackground(Color.BLUE); tmp1.setBounds(200, 5, 200, 20); getContentPane().add(tmp1,BorderLayout.SOUTH); setBackground(Color.black); } //%%%%%%%%%%%%%%%%%%%%%END FormatoLabel1: MES - AÑO%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%FormatoLabel2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% public void FormatoLabel2(String S_tmp2, JLabel tmp2, int d2) { tmp2.setText(" " + S_tmp2); tmp2.setFont(new Font("Papyrus", 0, 12)); tmp2.setBorder( new javax.swing.border.MatteBorder( new Insets(1, 1, 1, 1),Color.BLACK)); tmp2.setForeground(Color.black); getContentPane().add(tmp2); tmp2.setBounds(505, d2, 115, 19); } //%%%%%%%%%%%%%%%%%%%%%%%%%%%END FormatoLabel2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%ACTION PERFORMED(TIMER)%%%%%%%%%%%%%%%%%%%%%%%%%%%%% public void actionPerformed(ActionEvent e) { //ESTE SDF SE ACTUALIZARA CADA SEGUNDO Y SE MOSTRARA EN EL FRAME PRINCIPAL hora = new SimpleDateFormat("hh:mm:ss a"); S_hora = hora.format(new Date()); //SE ACTUALIZA LA HORA, SEGUNDO A SEGUNDO FormatoLabel2(S_hora, hora_label, 100); //SI FALTAN POCOS SEGUNDOS PARA CAMBIAR DE DIA, //AL LLEGAR LAS 12 AM EL CALENDARIO SE ACTUALIZA if (S_hora.equals("12:00:00 AM")) { here = Calendar.getInstance(); clear_PanelMain1(); init_calendario(here); PanelMain(here); } } //%%%%%%%%%%%%%%%%%%%%%END ACTION PERFORMED(TIMER)%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%PANEL & BOTONES MAIN%%%%%%%%%%%%%%%%%%%%%%%%%%%%% public void Botones_main() { //----------------PANEL & BOTONES << & >> IN MAIN----------------------- PanelBotonesMain = new JPanel(); PanelBotonesMain.setLayout(new BorderLayout()); PanelBotonesMain.setBackground(Color.ORANGE); //---------------------------- BOTON << -------------------------------- JButton Brewind; Brewind = new JButton(); Brewind.setText("<<"); Brewind.setBackground(Color.lightGray); Brewind.setForeground(Color.black); Brewind.setToolTipText("Haga click aqui para retroceder en un mes"); Brewind_MA = new MouseAdapter() { public void mouseReleased(MouseEvent evtR) { BrewindMouseReleased(evtR); } }; Brewind.addMouseListener(Brewind_MA); //-------------------------- END BOTON << ------------------------------ //---------------------------- BOTON >> -------------------------------- JButton Bforward; Bforward = new JButton(); Bforward.setText(">>"); Bforward.setBackground(Color.LIGHT_GRAY); Bforward.setForeground(Color.black); Bforward.setToolTipText("Haga click aqui para avanzar en un mes"); Bforward_MA = new MouseAdapter() { public void mouseReleased(MouseEvent evtF) { BforwardMouseReleased(evtF); } }; Bforward.addMouseListener(Bforward_MA); //-------------------------- END BOTON >> ------------------------------ //---------------------------- BOTON ABOUT ----------------------------- JButton BAbout; BAbout = new JButton(); BAbout.setText("Acerca de..."); BAbout.setBackground(Color.lightGray); BAbout.setForeground(Color.black); BAbout.setToolTipText("Información acerca de Asignador v1.0"); BAbout_MA = new MouseAdapter() { public void mouseReleased(MouseEvent evtA) { BAboutMouseReleased(evtA); } }; BAbout.addMouseListener(BAbout_MA); getContentPane().add(BAbout); BAbout.setBounds(505, 276, 115, 25); //-------------------------- END BOTON ABOUT --------------------------- //SE AGREGAN BOTONES << y >> AL PANEL PanelBotonesMain.add(Brewind, BorderLayout.WEST); PanelBotonesMain.add(Bforward, BorderLayout.EAST); //SE ANADE EL PANEL (<< y >>) A LA VENTANA PRINCIPAL getContentPane().add(PanelBotonesMain); PanelBotonesMain.setBounds(505, 199, 115, 30); //----------------END PANEL & BOTONES << & >> IN MAIN------------------- } //%%%%%%%%%%%%%%%%%%%%%%%%END PANEL & BOTONES MAIN%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%MOUSE EVENT & INIT FILE%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% private void Ventana(MouseEvent evt, int num) { if (evt.getComponent().isEnabled()) { S_Ventana = Integer.toString(num); if (num < 10) S_Ventana = "0".concat(S_Ventana); S_Ventana = S_Ventana.concat(".").concat(S_evento); //CREACION DE LA VENTANA SECUNDARIA QUE ALMACENA LOS EVENTOS PARA ESE DIA MainFrame frame = new MainFrame(S_dia,S_Ventana,S_A,this,P_eventos,(JButton) evt.getComponent()); frame.setSize(new Dimension(400, 324)); frame.setLocation(new Point(200, 200)); //frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // frame.show(); // APP APP_frame = new APP(S_Ventana, S_A,this,P_eventos,(JButton)evt.getComponent()); // APP_frame.setVisible(true); frame.setVisible(true); } //END if (evt.getComponent().isEnabled()) } //%%%%%%%%%%%%%%%%%%%%%%%%%%%END MOUSE EVENT%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%% MOUSE EVENT << %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% private void BrewindMouseReleased(MouseEvent evtR) { here.add(here.MONTH, -1); here.add(here.DATE, dia_num - 1); clear_PanelMain1(); init_calendario(here); PanelMain(here); } //%%%%%%%%%%%%%%%%%%%%%%%%%% END MOUSE EVENT << %%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%% MOUSE EVENT >> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% private void BforwardMouseReleased(MouseEvent evtF) { here.add(here.MONTH, 1); here.add(here.DATE, dia_num - 1); clear_PanelMain1(); init_calendario(here); PanelMain(here); } //%%%%%%%%%%%%%%%%%%%%%%%%%% END MOUSE EVENT >> %%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%% MOUSE EVENT ABOUT %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% private void BAboutMouseReleased(MouseEvent evtA) { this.setEnabled(false); frame_about = new JFrame(); //LAYOUT FRAME ABOUT frame_about.getContentPane().setLayout(null); frame_about.getContentPane().setBackground(Color.black); JButton BOK_about = new JButton(); BOK_about.setBackground(Color.white); BOK_about.setText("Aceptar"); BOK_about.setBounds(85, 140, 100, 20); BOK_about_MA = new MouseAdapter() { public void mouseReleased(MouseEvent evtOK) { BOK_aboutMouseReleased(evtOK); } }; BOK_about.addMouseListener(BOK_about_MA); JLabel label_about_programa = new JLabel("Asignador v1.0"); label_about_programa.setBounds(10, 10, 270, 20); label_about_programa.setForeground(Color.orange); JLabel label_about_autor = new JLabel("Autor: Cristian Oyarzo Calisto"); label_about_autor.setBounds(10, 35, 270, 20); label_about_autor.setForeground(Color.orange); JLabel label_about_email = new JLabel("e-Mail: lospri@elo.utfsm.cl"); label_about_email.setBounds(10, 55, 270, 20); label_about_email.setForeground(Color.orange); JLabel label_about_www = new JLabel("http://alumnos.elo.utfsm.cl/~lospri"); label_about_www.setBounds(10, 75, 270, 20); label_about_www.setForeground(Color.orange); JLabel label_about_year = new JLabel("Disfrute la aplicación"); label_about_year.setBounds(10, 95, 270, 20); label_about_year.setForeground(Color.orange); frame_about.getContentPane().add(BOK_about); frame_about.getContentPane().add(label_about_programa); frame_about.getContentPane().add(label_about_autor); frame_about.getContentPane().add(label_about_email); frame_about.getContentPane().add(label_about_year); frame_about.getContentPane().add(label_about_www); frame_about.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { setEnabled(true); } }); frame_about.pack(); Dimension screenSize_about = Toolkit.getDefaultToolkit().getScreenSize(); frame_about.setSize(280, 200); frame_about.setLocation( (screenSize_about.width - 200) / 2, (screenSize_about.height - 200) / 2); frame_about.setVisible(true); frame_about.setResizable(false); frame_about.setTitle("Acerca de.."); } //%%%%%%%%%%%%%%%%%%%%%%%%% MOUSE EVENT ABOUT %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%% MOUSE EVENT OK %%%%%&&&&%%%%%%%%%%%%%%%%%%%%%%%% private void BOK_aboutMouseReleased(MouseEvent evtOK) { this.setEnabled(true); frame_about.dispose(); } //%%%%%%%%%%%%%%%%%%%%%%%%% END MOUSE EVENT OK %%%%%%%%%%%%%%%%%%%%%%%%%%%%% //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%MAIN%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% public static void main(String[] args) { //CREACION CALENDARIO Calendar hereMain = Calendar.getInstance(); Asignador O_frame = new Asignador(hereMain); O_frame.setVisible(true); } //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%END MAIN%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% } //END CLASS ORGANIZER