I have a game where an object falls down when pressed Enter and hits the moving object at the bottom. When it hit's the moving object at the bottom score should be displayed somewhere(I want it in JLabel as I've done in code) I Have done the condition where dropping object touches the moving object but can't get the score displayed in Jlabel.

I have actually problem in scoring method in SmashGame Class And every thing else is working just fine.
Here is my code:


//SmashGAme Class
Code:
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;


public class SmashGame extends JFrame
{
	private Container contents;
	private final int WINDOW_SIZE = 400;
	private JPanel p1;
	private JButton button;
    private JButton start;
    
   
    private JLabel score;
   public int counter;
	DropObject dropper = new DropObject();
	SmashObject target = new SmashObject( (WINDOW_SIZE/2), (WINDOW_SIZE - 10),0,(WINDOW_SIZE) );
	public SmashGame()
	{		
	super("Start by Pressing Enter to drop and arrow key to move!");
    p1= new JPanel();
    p1.setLayout(new BoxLayout(p1,BoxLayout.Y_AXIS));
    JButton start = new JButton("Start");
    JButton reset=new JButton("Reset");
    JLabel score=new JLabel("Score "+counter);
    start = new JButton("Start");
	p1.add(start); 
   
    p1.add(reset);
   
    p1.add(score); 
   
    SmashObject target = new SmashObject( (WINDOW_SIZE/2), (WINDOW_SIZE - 10),0, (WINDOW_SIZE) );      
   
    contents = getContentPane( );
  
    contents.add(p1,"East");
  
    ButtonHandler bh=new ButtonHandler();
    
    start.addKeyListener(bh);
	
	setSize(WINDOW_SIZE, WINDOW_SIZE);

	setResizable(false);

	setVisible(true);
	  }
	  
	  
	/////PROBLEM PROBLEM PROBLEM PROBLEM  
      	public void scoring()
   	{
   
  	 if ((dropper.getY()+dropper.getHeight() >=target.getY()) && 
		   (dropper.getX()<= target.getX()+target.getWidth()) &&
		  (dropper.getX()+dropper.getWidth() >= target.getX()))
		
   	{
   		counter++;
   	}
score.setText("Score  :"+counter);

		}
   	
  	
   
   
  
private class ButtonHandler implements KeyListener
  {
 
	public void keyPressed(KeyEvent e) 
	{
	
			if (e.getKeyCode() == KeyEvent.VK_ENTER) 
		{
        dropper.falling=true;
			repaint();

	}
		
		 if(e.getKeyCode() == (KeyEvent.VK_LEFT))
       {
       		dropper.moveLeft();
       		repaint();
       }
       
       if(e.getKeyCode() == (KeyEvent.VK_RIGHT))
       {
       	dropper.moveRight();
       		repaint();
       		       }
		
	}
	public void keyReleased(KeyEvent e) {}
	public void keyTyped(KeyEvent e) {}
	}
	
	public void paint(Graphics g)
	{
	super.paint(g);
	target.draw(g);
	dropper.draw(g);
	try
	{
			Thread.sleep( 100 );
		}
				
		catch (InterruptedException ie)
		{
			ie.printStackTrace();
		}				
		
repaint();
		
	}
	
	
	
	public static void main(String [] args)
	{
		SmashGame newGame = new SmashGame();
		
		newGame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	}
	
}
//DropObject Class//
Code:
// This is the class for the object to be dropped
// This is the class for the object to be dropped

import java.awt.*;



public class DropObject
{
	
	public int x;
private int y; 
private int height=10;
private int width=10;	
	private int yMax; 
	
	private int dropSpeed; 
	public boolean falling;
	

	public DropObject()
	{
		
		x = 200;
		y = 30;
		
		dropSpeed = 4;
		
		yMax = 400;
		falling=false;	
		
	}



	
	public void setX(int newX)
	{
		
		x = newX;
		
	}
	
	public void setYMax(int newYMax)
	{
		yMax = newYMax;
	}
	
	
	
	public void changeSpeed(int newSpeed)
	{
		dropSpeed = newSpeed;
	}
	
	
	public int getX()
	{
		return x;
	}
	
	
	public int getY()
	{
		return y;
	}
	
		public int getHeight()
	{
		return height;
	}
		public int getWidth()
	{
		return width;
	}
	
	
	public void drop()
	{
	
	
			y += dropSpeed;
		
	}
	
		public void moveRight()
	{
		if( x+width+1 > 400 ){}
		else
		{
			x+=10;
		}
	}
	
	//If the paddle can be moved left, move it left, should call from key listener in Pong.java
	public void moveLeft()
	{
		if(x - 1 < 0){}
		else
		{
			x -= 10;
		}
	}
	
	

	public void draw(Graphics g)
	{
	
		g.setColor(Color.red);
		g.fillRect(x,y,width,height);
		if(falling==true)
		drop();
		
	}

}
//Object moving at the buttom:
Code:
import java.awt.*;


public class SmashObject
{
	
public int x;
	private int y;
private int height=30;
private int width=50;
	private int xMax;
	private int xMin;
	
	private int moveSpeed;
	
	public SmashObject()
	{
		x = 20;
		y = 20;
		xMax = 40;
		xMin = 0;
		moveSpeed = 6;
		
	}
	
	
	public SmashObject(int xIn, int yIn, int xMinIn, int xMaxIn)
	{
	
	x = xIn;
	y = yIn;
	xMin = xMinIn;
	xMax = xMaxIn;
	
	moveSpeed=4;
	}
	
	
	
	public void setX(int newX)
	{
		x = newX;
	}

	public void setY(int newY)
	{
		y = newY;
		
	}

	
	public int getX()
		{
		return x;
	}
	
	public int getY()
	{
		return y;
	}
	
	public int getWidth()
	{
		return width;
	}
	
	public void moveObject()
	{
	
		
		
		
		if (x + moveSpeed+width > xMax|| x + moveSpeed < xMin)
		{
		moveSpeed = - moveSpeed;
			
			x = ((Math.abs((xMax - x)) < Math.abs((xMin-x))) ? xMax-width : xMin);
			
		}
		
		
	
		else
		{
			x += moveSpeed;
		} 
	}
	
	
	public void draw(Graphics g)
	{
		g.setColor(Color.red);
		g.fillRect(x,y,width,height);
		moveObject();
		
	}
	
	
	
}