
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.event.MouseEvent;
import java.awt.event.MouseMotionListener;
import java.awt.geom.Ellipse2D;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;


import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.GridLayout;
import java.awt.Image;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
import java.awt.geom.Ellipse2D;
import java.io.FileInputStream;
import java.io.IOException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.sql.Statement;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;

import javax.imageio.ImageIO;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JSplitPane;
import javax.swing.JTabbedPane;
import javax.swing.JTable;
import javax.swing.JTextArea;
import javax.swing.JToolBar;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import javax.swing.table.AbstractTableModel;



import javax.swing.JPanel;



public class TopPanel extends JPanel
{

	   public TopPanel()
	    {
	    	split02.myArea.setText("[ INFO ]: Init GUI : OK" + "\n");
	    	
	    	DateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss");
	    	Date date = new Date();
	    	dateFormat.format(date);
	   	
	    	split02.myArea.append(dateFormat.format(date) + "\n");
	    	
	    	
	    	this.setBackground(Color.orange);

	    	addMouseListener(new MouseAdapter() { 
	            public void mousePressed(MouseEvent me) 
	            { 
	            	StatusPanel status = null;
	            	
	            	status.incrementClickCount();
	            	System.out.println(me); 
	            } 
	          }); 

	         

	    	
	    	repaint();
	    }
	    
	    @Override
		public void paint(Graphics g) 
		{
			Graphics2D g2d = (Graphics2D) g;
			g2d.setColor(Color.GREEN);
			g2d.fillOval(0, 0, 30, 30);
			g2d.drawOval(0, 50, 30, 30);		
			g2d.fillRect(50, 0, 30, 30);
			g2d.drawRect(50, 50, 30, 30);

			g2d.draw(new Ellipse2D.Double(0, 100, 30, 30));
		
		}
}

/********************************************************/

class MyMousePositionsListener implements MouseMotionListener 
{ 
	private StatusPanel statusPane; 

	public MyMousePositionsListener(StatusPanel s) 
	{ 
		statusPane = s;
	} 

	public void mouseMoved(MouseEvent evt) 
	{ 
		statusPane.setCoordinates(evt.getX(),evt.getY()); 
	} 

	public void mouseDragged(MouseEvent evt) 
	{ 
	} 
}

/********************************************************/

class MyMouseListener implements MouseListener
{
	private StatusPanel statusPane;

	public MyMouseListener(StatusPanel s)
	{
		statusPane = s;
	}

	public void mouseEntered(MouseEvent e)
	{
		statusPane.setInOut("yes");
	}

	public void mouseExited(MouseEvent e)
	{
		statusPane.setInOut("no");
		statusPane.setCoordinates(-1,-1);
	}

	public void mouseClicked(MouseEvent e)
	{
		statusPane.incrementClickCount();
	}

	public void mousePressed(MouseEvent e)
	{
	}

	public void mouseReleased(MouseEvent e)
	{
	}

 }

/********************************************************/

