Question: Below is the my code for Simple date format.Where iam getting o/p as 

1. `2012-03-13`
2. `13:15:00-4:00`
3. `2012/03/13 13:15:00 +0530`

but i need the o/p in the format `MM/dd/yyyy HH:mm`

```
public class Time {
        public static void main(String args[]) throws ParseException
        {
            SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            SimpleDateFormat ti=new SimpleDateFormat("MM/dd/yyyy HH:mm");
            SimpleDateFormat sdf1=new SimpleDateFormat("yyyy/MM/dd HH:mm:ss Z");
            String dt=    "2012-03-13T13:15:00-4:00";

        String st[]=dt.split("T");
        System.out.println(st[0]);
        System.out.println(st[1]);

        String time[]= st[1].split("-");

        Date fromDt =(Date)sdf.parse(st[0]+" "+time[0]);

        System.out.println(sdf1.format(fromDt));

    }

}

```

Answer: 
Don't set preferred sizes of `JScrollPane`'s content. Set preferred size for the `JScrollPanes` instead.
Thx. I had same problem and preferred sizes (reset to [0,0]) fixed this up.