
48 So.3d 1022 (2010)
Florencio CHAVEZ, Appellant,
v.
STATE of Florida, Appellee.
No. 2D09-1423.
District Court of Appeal of Florida, Second District.
December 8, 2010.
*1023 James Marion Moorman, Public Defender, and Allyn M. Giambalvo, Assistant Public Defender, Bartow, for Appellant.
Bill McCollum, Attorney General, Tallahassee, and Jonathan P. Hurley, Assistant Attorney General, Tampa, for Appellee.
ALTENBERND, Judge.
Florencio Chavez appeals his judgments and sentences for possession of cocaine, possession of paraphernalia, and resisting arrest without violence. He raises four issues on appeal. We conclude that the trial court erred in denying Mr. Chavez's motion for a continuance. Because we grant a new trial on this issue, we do not reach the other issues.
In February 2009, Mr. Chavez had four separate pending criminal cases filed in one felony division in DeSoto County. The case that actually went to trial and is the case pending in this court is identified as case CF-756. In CF-484, he was charged with felony battery and aggravated battery. In case CF-485, he was charged with possession of cocaine, possession of paraphernalia, and possession of cocaine with intent to sell. Finally, in case CF-752, he was charged with possession of cocaine.
On February 9, 2009, over the objection of Mr. Chavez, the court set case CF-485 for trial on February 25, rather than setting case CF-484 first as the oldest case. The State claimed that it had already sent out subpoenas for case CF-485 and that it was ready to proceed with that trial.
*1024 On February 19, the court's judicial assistant called Mr. Chavez's attorney and advised him that there had been a change in plans and that case CF-756 would be tried on February 25. Mr. Chavez's attorney immediately filed a motion for a continuance, explaining that he had not been consulted about this change and had been preparing for trial in the case that the court had set over his objection. Excluding the weekend, he had very little time to change course and prepare for this other trial.
Mr. Chavez's attorney already had a hearing set on February 20 on a motion to suppress in case CF-485. At that hearing, the parties addressed the motion for continuance. It became clear that the State had misspoken at the prior hearing and that the case the State was actually preparing for trial had been CF-756. The State did not yet have the results of drug testing for case CF-485 and was not ready for trial in that case.[1] The trial court denied the motion for continuance filed by Mr. Chavez's attorney. Thus, the parties ultimately tried the case that the State had been preparing for trial for several weeks and that the defendant had the opportunity to prepare for only a few days.
The denial of a motion for continuance is within the sound discretion of the trial court, and the trial court's ruling will not be disturbed unless a palpable abuse of discretion is shown. M.D.B. v. State, 952 So.2d 590 (Fla. 2d DCA 2007). In a criminal case, however, the defendant and his or her counsel are entitled to a reasonable time to prepare for trial. See Browne v. State, 88 Fla. 457, 102 So. 546, 546-47 (1924); Langon v. State, 791 So.2d 1105, 1113 (Fla. 4th DCA 1999). Thus, "[t]he common thread running through those cases in which a palpable abuse of discretion has been found, is that defense counsel must be afforded an adequate opportunity to investigate and prepare any applicable defense." Smith v. State, 525 So.2d 477, 479 (Fla. 1st DCA 1988).
In M.F. v. State, 920 So.2d 1252, 1254 (Fla. 2d DCA 2006), following the First District, we set forth the factors to consider in determining whether a trial court abused its discretion in the denial of a motion for continuance based on inadequate time to prepare a defense. These factors include:
1) the time available for preparation, 2) the likelihood of prejudice from the denial, 3) the defendant's role in shortening preparation time, 4) the complexity of the case, 5) the availability of discovery, 6) the adequacy of counsel actually provided and 7) the skill and experience of chosen counsel and his pre-retention experience with either the defendant or the alleged crime.
Id. (citing McKay v. State, 504 So.2d 1280, 1282 (Fla. 1st DCA 1986)).
It is noteworthy that this case involves circumstances that differ from the usual case in which defense counsel has sought additional time to prepare for trial. Here, the trial court essentially granted the State's unfiled motion for continuance *1025 in CF-485, a case in which the State was unprepared to go to trial and in which a judgment of acquittal was likely without the continuance, and, on very short notice and without consulting defense counsel, substituted another case in which the State was fully prepared for trial. Only this reordering of the trial dates prompted defense counsel's motion to continue. We evaluate the trial court's decision to deny the motion for a continuance in light of these circumstances.
Applying the factors outlined in M.F., we conclude that the trial court abused its discretion in denying the request for a continuance. The State had defense counsel preparing for trial on the wrong case, over his objection, until days before the trial. Neither Mr. Chavez nor his attorney was at fault for the reordering of the trial dates. The record indicates that the State had not yet responded to an outstanding request for additional discovery filed the previous year. Having diligently prepared a separate case for trial, counsel was left with four days to complete the trial preparation of this case.
We have reviewed the record and cannot say beyond a reasonable doubt that the failure to continue this case was harmless. See State v. DiGuilio, 491 So.2d 1129, 1135 (Fla. 1986). Accordingly, we reverse and remand for a new trial.
Reversed and remanded.
VILLANTI and KHOUZAM, JJ., Concur.
NOTES
[1]  Defense counsel was also concerned that the court had rescheduled the cases in some manner that had involved communication between the State and the court without defense counsel's participation. The court clearly saw the communication as a matter involving administrative responsibilities rather than adjudicative responsibilities under Canon 3 of the Code of Judicial Conduct. Given that more than one case was involved, the matter is probably debatable, and we do not fault the judge in this procedure. The one-sided communications, however, prevented the defense from providing its position on the decision to substitute one trial for the other and reduced the amount of time that the defense had to prepare for trial.
