Currently it is not possible to use TaskDialogs in an JInternalFrame without dirty hacks. Main problem is, that the TaskDialogContent is strong-bounded to the JDialog instance inside TaskDialog class, see TaskDialogContent.setCommands(Set<? extends TaskDialog.Command>, boolean) which uses the getOwner() method.
A simple API like TaskDialogs for JInternalFrames would be nice and/or an ability to get the TaskDialogContent which is independent of JDialog or JInternalFrame class.