class ImproperPanel extends JPanel
{
public ImproperPanel()
{
setPreferredSize(new Dimension(800,600));
}
public void paintComponent(Graphics g)
{
super.paintComponent(g);
Graphics2D g2d = (Graphics2D)g;
//*********************************************************
g2d.setTransform(AffineTransform.getScaleInstance(1f,1f)); //The reason about the problem!!!
//*********************************************************